diff options
Diffstat (limited to 'spec/ruby/core/array/shared/join.rb')
-rw-r--r-- | spec/ruby/core/array/shared/join.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/ruby/core/array/shared/join.rb b/spec/ruby/core/array/shared/join.rb index 0fd2e0ff9b..28b3d8c04c 100644 --- a/spec/ruby/core/array/shared/join.rb +++ b/spec/ruby/core/array/shared/join.rb @@ -19,8 +19,10 @@ describe :array_join_with_default_separator, shared: true do end it "returns a string formed by concatenating each String element separated by $," do - $, = " | " - ["1", "2", "3"].send(@method).should == "1 | 2 | 3" + suppress_warning { + $, = " | " + ["1", "2", "3"].send(@method).should == "1 | 2 | 3" + } end it "attempts coercion via #to_str first" do |