File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 41
41
42
42
( -dynamic ) . should_not equal ( "this string is frozen" . freeze )
43
43
( -dynamic ) . should_not equal ( -"this string is frozen" . freeze )
44
+ ( -dynamic ) . should == "this string is frozen"
44
45
end
45
46
46
47
it "does not deduplicate tainted strings" do
47
48
dynamic = %w( this string is frozen ) . join ( ' ' )
48
49
dynamic . taint
49
50
( -dynamic ) . should_not equal ( "this string is frozen" . freeze )
50
51
( -dynamic ) . should_not equal ( -"this string is frozen" . freeze )
52
+ ( -dynamic ) . should == "this string is frozen"
51
53
end
52
54
53
55
it "does not deduplicate strings with additional instance variables" do
54
56
dynamic = %w( this string is frozen ) . join ( ' ' )
55
57
dynamic . instance_variable_set ( :@foo , :bar )
56
58
( -dynamic ) . should_not equal ( "this string is frozen" . freeze )
57
59
( -dynamic ) . should_not equal ( -"this string is frozen" . freeze )
60
+ ( -dynamic ) . should == "this string is frozen"
58
61
end
59
62
end
60
63
Original file line number Diff line number Diff line change @@ -1594,6 +1594,8 @@ def -@
1594
1594
unless str . tainted? || !( str . instance_variables ) . empty?
1595
1595
Truffle ::Ropes . flatten_rope ( str )
1596
1596
Truffle . invoke_primitive ( :string_intern , str )
1597
+ else
1598
+ str
1597
1599
end
1598
1600
end
1599
1601
You can’t perform that action at this time.
0 commit comments