StringIO#<< and various read methods crash ruby if invoked on only-allocated
object
-----------------------------------------------------------------------------------
Key: JRUBY-2629
URL: http://jira.codehaus.org/browse/JRUBY-2629
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1.2
Environment: Latest JRuby
Reporter: Vladimir Sizikov
Assignee: Vladimir Sizikov
Fix For: JRuby 1.1.3
StringIO.allocate.read
StringIO.allocate << 5
and similar methods leads to crash:
{noformat}
java.lang.NullPointerException
at org.jruby.RubyStringIO.checkReadable(RubyStringIO.java:778)
at org.jruby.RubyStringIO.read(RubyStringIO.java:497)
at org.jruby.RubyStringIOInvoker$read_method_0_2.call(Unknown Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodNoBlock.call(JavaMethod.java:63)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:70)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:121)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:326)
{noformat}
Will fix.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email