Skip to content

Commit

Permalink
Added specs for partial string interpolation sequences which are not …
Browse files Browse the repository at this point in the history
…actual

interpolations.  They should just reflect the original string.
enebo committed Feb 18, 2018
1 parent 05e415c commit 9a7b4aa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/ruby/language/string_spec.rb
Original file line number Diff line number Diff line change
@@ -42,6 +42,15 @@
"#@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

0 comments on commit 9a7b4aa

Please sign in to comment.