Skip to content

Commit 9a7b4aa

Browse files
committedFeb 18, 2018
Added specs for partial string interpolation sequences which are not actual
interpolations. They should just reflect the original string.
1 parent 05e415c commit 9a7b4aa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎spec/ruby/language/string_spec.rb

+9
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@
4242
"#@ip#@ip".should == 'xxxxxx'
4343
end
4444

45+
it "don't get confused by partial interpolation character sequences" do
46+
"#@".should == '#@'
47+
"#@ ".should == '#@ '
48+
"#@@".should == '#@@'
49+
"#@@ ".should == '#@@ '
50+
"#$ ".should == '#$ '
51+
"#\$".should == '#$'
52+
end
53+
4554
it "taints the result of interpolation when an interpolated value is tainted" do
4655
"#{"".taint}".tainted?.should be_true
4756

0 commit comments

Comments
 (0)