diff options
Diffstat (limited to 'spec/ruby/core/array/join_spec.rb')
-rw-r--r-- | spec/ruby/core/array/join_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/ruby/core/array/join_spec.rb b/spec/ruby/core/array/join_spec.rb index 16f0dcee7a..403bae7183 100644 --- a/spec/ruby/core/array/join_spec.rb +++ b/spec/ruby/core/array/join_spec.rb @@ -38,11 +38,13 @@ describe "Array#join with $," do end after :each do - $, = @before_separator + suppress_warning {$, = @before_separator} end it "separates elements with default separator when the passed separator is nil" do - $, = "_" - [1, 2, 3].join(nil).should == '1_2_3' + suppress_warning { + $, = "_" + [1, 2, 3].join(nil).should == '1_2_3' + } end end |