summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/scrub_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/scrub_spec.rb')
-rw-r--r--spec/ruby/core/string/scrub_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/string/scrub_spec.rb b/spec/ruby/core/string/scrub_spec.rb
index b513acfb70..5c67ad01bc 100644
--- a/spec/ruby/core/string/scrub_spec.rb
+++ b/spec/ruby/core/string/scrub_spec.rb
@@ -119,4 +119,10 @@ describe "String#scrub!" do
input.scrub!
input.instance_variable_get(:@a).should == 'b'
end
+
+ it "accepts a frozen string as a replacement" do
+ input = "a\xE2"
+ input.scrub!('.'.freeze)
+ input.should == 'a.'
+ end
end