You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Already posted to Ruby community as https://bugs.ruby-lang.org/issues/11445 but rejected because 1.9 is close.
I don't know whether you have same support range or not so sending here too.
In Ruby 1.9.3 cloned StringIO instance has influence on close state of original instance:
If File is used instead of StringIO, close state is not shared between instances (position is).
This behaviour has changed in Ruby 2.0.0 (cloned StringIO instance does not close original instance).
It matters what definition for IO clone is, whether to share attributes (e.g. pos) and/or state (closed?) but the later is acting differently in 1.9.3 for StringIO and File.
This is also true for 2.0 until JRuby 1.7.9+
The text was updated successfully, but these errors were encountered:
Seems like an ok thing to fix, and we're still supporting JRuby 1.7. However changing visible behavior away from MRI is something we generally don't do.
Perhaps you could update to JRuby 9k, which is compatible with Ruby 2.2?
It appears that MRI does not do what you want, even in 2.2. It isolates closed? state but shares pos state.
Both JRuby 1.7.21 and JRuby 9.0.0.0 follow the same behavior.
If you believe the behavior of Ruby 2.2 (sharing pos) is incorrect, you should file a new issue against ruby trunk and make your case there. If they change it, we'll change it.
Already posted to Ruby community as https://bugs.ruby-lang.org/issues/11445 but rejected because 1.9 is close.
I don't know whether you have same support range or not so sending here too.
In Ruby 1.9.3 cloned
StringIO
instance has influence on close state of original instance:If
File
is used instead ofStringIO
, close state is not shared between instances (position is).This behaviour has changed in Ruby 2.0.0 (cloned
StringIO
instance does not close original instance).It matters what definition for
IO
clone is, whether to share attributes (e.g.pos
) and/or state (closed?
) but the later is acting differently in 1.9.3 forStringIO
andFile
.This is also true for 2.0 until JRuby 1.7.9+
The text was updated successfully, but these errors were encountered: