summaryrefslogtreecommitdiff
path: root/spec/ruby/core/file/expand_path_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/file/expand_path_spec.rb')
-rw-r--r--spec/ruby/core/file/expand_path_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ruby/core/file/expand_path_spec.rb b/spec/ruby/core/file/expand_path_spec.rb
index c31f885b92..1abcf93900 100644
--- a/spec/ruby/core/file/expand_path_spec.rb
+++ b/spec/ruby/core/file/expand_path_spec.rb
@@ -137,7 +137,7 @@ describe "File.expand_path" do
it "returns a String in the same encoding as the argument" do
Encoding.default_external = Encoding::SHIFT_JIS
- path = "./a".force_encoding Encoding::CP1251
+ path = "./a".dup.force_encoding Encoding::CP1251
File.expand_path(path).encoding.should equal(Encoding::CP1251)
weird_path = [222, 173, 190, 175].pack('C*')