-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GZipFile#close does not return IO object as MRI does #5197
Milestone
Comments
Weird feature. |
Ok, I think I've fixed this on master. You should see an updated build. There does not appear to be a test for this in either CRuby's suite or in ruby/spec. Perhaps you could add something over at https://github.com/ruby/spec? |
pcarlisle
added a commit
to pcarlisle/puppet
that referenced
this issue
May 31, 2018
JRuby doesn't seem to return the IO object the way MRI does, so don't rely on that. jruby/jruby#5197
pcarlisle
pushed a commit
to pcarlisle/puppet
that referenced
this issue
Jun 1, 2018
JRuby does not return the associated IO object from GZipFile#close as MRI does. Work around this by asking for the string directly from the IO object. This is cleaner anyway. jruby/jruby#5197
pcarlisle
pushed a commit
to pcarlisle/puppet
that referenced
this issue
Jun 4, 2018
JRuby does not return the associated IO object from GZipFile#close as MRI does. Work around this by asking for the string directly from the IO object. This is cleaner anyway. jruby/jruby#5197
pcarlisle
pushed a commit
to pcarlisle/puppet
that referenced
this issue
Jun 5, 2018
JRuby does not return the associated IO object from GZipFile#close as MRI does. Work around this by asking for the string directly from the IO object. This is cleaner anyway. jruby/jruby#5197
ccaviness
pushed a commit
to ccaviness/puppet
that referenced
this issue
Sep 19, 2018
JRuby does not return the associated IO object from GZipFile#close as MRI does. Work around this by asking for the string directly from the IO object. This is cleaner anyway. jruby/jruby#5197
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MRI documents (and implements) that #close on GZipFile and subclasses should return the associated IO object. JRuby returns nil.
https://ruby-doc.org/stdlib-2.3.0/libdoc/zlib/rdoc/Zlib/GzipFile.html#method-i-close
https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/ext/zlib/RubyGzipFile.java#L252-L255
https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/ext/zlib/JZlibRubyGzipWriter.java#L195
In MRI I can do this:
which fails in JRuby when trying to call
string
onnil
. I'm running 9.1.16.0 but looks from the source like this has not changed.The text was updated successfully, but these errors were encountered: