-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
Milestone
Description
Environment
- JRuby version:
jruby -v: jruby 9.1.7.0 (2.3.1) 2017-01-11 68056ae Java HotSpot(TM) 64-Bit Server VM 25.73-b02 on 1.8.0_73-b02 +jit [linux-x86_64]- No flags or JRUBY_OPTS
- Operating system and platform
uname -a: Linux manu-dm 4.4.0-45-generic Proc interface regression #66~14.04.1-Ubuntu SMP Wed Oct 19 15:05:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Expected Behavior
Creating enumerators inside GZipReader blocks should not crash. The simple example below works fine (doesn't crash) on MRI 2.3.0:
# /tmp/local_jump_error.rb
require 'zlib'
# echo | gzip > /tmp/somefile.gz
Zlib::GzipReader.open('/tmp/somefile.gz') do |f|
e = f.each_line
# ...
endActual Behavior
Instead, a LocalJumpError exception is raised:
LocalJumpError: yield called out of block
each at org/jruby/ext/zlib/JZlibRubyGzipReader.java:617
each_line at org/jruby/ext/zlib/JZlibRubyGzipReader.java:628
block in local_jump_error.rb at local_jump_error.rb:6
open at org/jruby/ext/zlib/JZlibRubyGzipReader.java:99
<main> at local_jump_error.rb:5
Note that using File.open instead of Zlib::GzipReader.open does not raise any error.
Reactions are currently unavailable