String passes class extensions to subclasses when we call a non mutable method
------------------------------------------------------------------------------
Key: JRUBY-4883
URL: http://jira.codehaus.org/browse/JRUBY-4883
Project: JRuby
Issue Type: Bug
Reporter: David Calavera
Assignee: David Calavera
Priority: Minor
Some methods like chop, chomp or gsub share the same behaviour discovered by
bobmcw in JRUBY-4881.
It's because the method RubyString#makeShared uses the metaClass rather than
the realClass to create the new strings. The quick fix would be to modify that
method to use getType() but that can break other things. Seems Rubyspec doesn't
describe that behaviour either.
I'm reviewing the String methods to ensure we fix this properly.
--
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