Skip to content

Commit

Permalink
Make Proc#call destructure arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Sep 24, 2013
1 parent 076c7af commit 659dc8b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion corelib/proc.rb
Expand Up @@ -14,7 +14,14 @@ def call(*args, &block)
#{self}._p = block;
}
var result = #{self}.apply(null, #{args});
var result;
if (#{self}.is_lambda) {
result = #{self}.apply(null, #{args});
}
else {
result = Opal.$yieldX(#{self}, #{args});
}
if (result === $breaker) {
return $breaker.$v;
Expand Down

0 comments on commit 659dc8b

Please sign in to comment.