Skip to content

Commit

Permalink
Fix lambda status of blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Sep 24, 2013
1 parent 659dc8b commit da95ec6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions corelib/kernel.rb
Expand Up @@ -335,6 +335,8 @@ def is_a?(klass)
alias kind_of? is_a?

def lambda(&block)
`block.is_lambda = true`

block
end

Expand Down
2 changes: 1 addition & 1 deletion corelib/proc.rb
@@ -1,6 +1,6 @@
class Proc
`def._isProc = true`
`def.is_lambda = true`
`def.is_lambda = false`

def self.new(&block)
`if (block === nil) { throw new Error("no block given"); }`
Expand Down

0 comments on commit da95ec6

Please sign in to comment.