Skip to content
Browse files

Tweak #try spec to ensure blocks still work

  • Loading branch information...
1 parent d2ecedd commit 011ffe516d57536eb157acc61d82695fb0bf63ae @kballard kballard committed May 31, 2008
Showing with 1 addition and 0 deletions.
  1. +1 −0 spec/extensions_spec.rb
View
1 spec/extensions_spec.rb
@@ -10,6 +10,7 @@
specify "objects should behave as if #try wasn't called" do
"foo".try.size.should == 3
{ :foo => :bar }.try.fetch(:foo).should == :bar
+ [1, 2, 3].try.map { |x| x + 1 }.should == [2, 3, 4]
end
specify "nil should return the singleton NilClass::NilProxy" do

0 comments on commit 011ffe5

Please sign in to comment.
Something went wrong with that request. Please try again.