diff options
Diffstat (limited to 'spec/ruby/language/string_spec.rb')
-rw-r--r-- | spec/ruby/language/string_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/language/string_spec.rb b/spec/ruby/language/string_spec.rb index dbec2652ed..d1090e1771 100644 --- a/spec/ruby/language/string_spec.rb +++ b/spec/ruby/language/string_spec.rb @@ -42,6 +42,15 @@ describe "Ruby character strings" do "#@ip#@ip".should == 'xxxxxx' end + it "don't get confused by partial interpolation character sequences" do + "#@".should == '#@' + "#@ ".should == '#@ ' + "#@@".should == '#@@' + "#@@ ".should == '#@@ ' + "#$ ".should == '#$ ' + "#\$".should == '#$' + end + it "taints the result of interpolation when an interpolated value is tainted" do "#{"".taint}".tainted?.should be_true |