aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/string/try_convert_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/try_convert_spec.rb')
-rw-r--r--spec/ruby/core/string/try_convert_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/string/try_convert_spec.rb b/spec/ruby/core/string/try_convert_spec.rb
index 629817110e..84415c4a75 100644
--- a/spec/ruby/core/string/try_convert_spec.rb
+++ b/spec/ruby/core/string/try_convert_spec.rb
@@ -39,12 +39,12 @@ describe "String.try_convert" do
it "sends #to_str to the argument and raises TypeError if it's not a kind of String" do
obj = mock("to_str")
obj.should_receive(:to_str).and_return(Object.new)
- lambda { String.try_convert obj }.should raise_error(TypeError)
+ -> { String.try_convert obj }.should raise_error(TypeError)
end
it "does not rescue exceptions raised by #to_str" do
obj = mock("to_str")
obj.should_receive(:to_str).and_raise(RuntimeError)
- lambda { String.try_convert obj }.should raise_error(RuntimeError)
+ -> { String.try_convert obj }.should raise_error(RuntimeError)
end
end