Skip to content

Commit b826066

Browse files
committed
Spec that Tempfile#initialize does not modify the arguments
1 parent 61ef6f4 commit b826066

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/ruby/library/tempfile/initialize_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,9 @@
3838
@tempfile.send(:initialize, ['shiftjis', 'yml'], encoding: 'SHIFT_JIS')
3939
@tempfile.external_encoding.should == Encoding::Shift_JIS
4040
end
41+
42+
it "does not try to modify the arguments" do
43+
@tempfile.send(:initialize, ['frozen'.freeze, 'txt'.freeze], encoding: Encoding::IBM437)
44+
@tempfile.external_encoding.should == Encoding::IBM437
45+
end
4146
end

0 commit comments

Comments
 (0)