mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Spec: Fix spec/ruby/core/array/reject_spec.rb & misc
Patch by @MSP-Greg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c312111c7c
commit
bf6c9a5c6d
2 changed files with 8 additions and 9 deletions
|
@ -126,10 +126,13 @@ describe "Array#reject!" do
|
|||
a = [1, 2, 3, 4]
|
||||
begin
|
||||
a.reject! do |x|
|
||||
return true if x == 2
|
||||
raise raise StandardError, 'Oops' if x == 3
|
||||
case x
|
||||
when 2 then true
|
||||
when 3 then raise StandardError, 'Oops'
|
||||
else false
|
||||
end
|
||||
end
|
||||
rescue
|
||||
rescue StandardError
|
||||
end
|
||||
|
||||
a.should == [1, 3, 4]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue