Skip to content

Commit

Permalink
refactored Kernel#extract a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Andreev committed May 1, 2008
1 parent 8806a20 commit 93d1066
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/strokedb/core_ext/kernel.rb
Expand Up @@ -31,12 +31,7 @@ def extract(*template_and_args)

args.each do |a|
unless while t = template_and_args.shift
if t === a
result << a
break(true)
else
result << nil
end
t === a and result << a and break 1 or result << nil
end
raise ArgumentError, "Unexpected argument #{a.inspect} is passed!"
end
Expand Down

0 comments on commit 93d1066

Please sign in to comment.