summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/shared/join.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-07-27 12:40:09 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-07-27 12:40:09 +0200
commit5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch)
tree05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/core/array/shared/join.rb
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/array/shared/join.rb')
-rw-r--r--spec/ruby/core/array/shared/join.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/array/shared/join.rb b/spec/ruby/core/array/shared/join.rb
index 0d07e93b2c..38bdde9502 100644
--- a/spec/ruby/core/array/shared/join.rb
+++ b/spec/ruby/core/array/shared/join.rb
@@ -49,13 +49,13 @@ describe :array_join_with_default_separator, shared: true do
it "raises a NoMethodError if an element does not respond to #to_str, #to_ary, or #to_s" do
obj = mock('o')
class << obj; undef :to_s; end
- lambda { [1, obj].send(@method) }.should raise_error(NoMethodError)
+ -> { [1, obj].send(@method) }.should raise_error(NoMethodError)
end
it "raises an ArgumentError when the Array is recursive" do
- lambda { ArraySpecs.recursive_array.send(@method) }.should raise_error(ArgumentError)
- lambda { ArraySpecs.head_recursive_array.send(@method) }.should raise_error(ArgumentError)
- lambda { ArraySpecs.empty_recursive_array.send(@method) }.should raise_error(ArgumentError)
+ -> { ArraySpecs.recursive_array.send(@method) }.should raise_error(ArgumentError)
+ -> { ArraySpecs.head_recursive_array.send(@method) }.should raise_error(ArgumentError)
+ -> { ArraySpecs.empty_recursive_array.send(@method) }.should raise_error(ArgumentError)
end
it "taints the result if the Array is tainted and non-empty" do
@@ -109,7 +109,7 @@ describe :array_join_with_default_separator, shared: true do
it "fails for arrays with incompatibly-encoded strings" do
ary_utf8_bad_binary = ArraySpecs.array_with_utf8_and_binary_strings
- lambda { ary_utf8_bad_binary.send(@method) }.should raise_error(EncodingError)
+ -> { ary_utf8_bad_binary.send(@method) }.should raise_error(EncodingError)
end
end