diff options
Diffstat (limited to 'spec/ruby/core/string/chilled_string_spec.rb')
| -rw-r--r-- | spec/ruby/core/string/chilled_string_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/core/string/chilled_string_spec.rb b/spec/ruby/core/string/chilled_string_spec.rb index 968e4ec1f0..73d055cbdf 100644 --- a/spec/ruby/core/string/chilled_string_spec.rb +++ b/spec/ruby/core/string/chilled_string_spec.rb @@ -47,6 +47,14 @@ describe "chilled String" do input.should == "chilled-mutated" end + it "emits a warning for concatenated strings" do + input = "still" "+chilled" + -> { + input << "-mutated" + }.should complain(/literal string will be frozen in the future/) + input.should == "still+chilled-mutated" + end + it "emits a warning on singleton_class creation" do -> { "chilled".singleton_class |
