Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.7.0.pre1
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:$ jruby --1.9 -v
jruby 1.7.0.dev (ruby-1.9.3-p6) (2012-01-21 0d0c764) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_02) [linux-amd64-java]
-
Number of attachments :
Description
Steps to reproduce:
s = "test"
t = String.new(s)
t.setbyte(0, "r".ord)
p s #=> rest
p t #=> rest
puts s == "rest" #=> true
puts s == "test" #=> false
I was under the impression that s should still be equal to "test", that is t should be a copy of the contents of s. That's at least what I get in CRuby(1.9.3)?