summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/ord_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/ord_spec.rb')
-rw-r--r--spec/ruby/core/string/ord_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ruby/core/string/ord_spec.rb b/spec/ruby/core/string/ord_spec.rb
index 4cf26990fe..35af3b5458 100644
--- a/spec/ruby/core/string/ord_spec.rb
+++ b/spec/ruby/core/string/ord_spec.rb
@@ -27,7 +27,7 @@ describe "String#ord" do
end
it "raises ArgumentError if the character is broken" do
- s = "©".force_encoding("US-ASCII")
+ s = "©".dup.force_encoding("US-ASCII")
-> { s.ord }.should raise_error(ArgumentError, "invalid byte sequence in US-ASCII")
end
end