From: daniel@...42.com Date: 2019-08-05T16:04:53+00:00 Subject: [ruby-core:94150] [Ruby master Feature#15973] Make it so Kernel#lambda always return a lambda Issue #15973 has been updated by Dan0042 (Daniel DeLorme). This may be irrelevant but I would like to point out that proc->lambda conversion was supported in ruby 1.8 ```ruby b = Proc.new{ return 42 } b.call #=> LocalJumpError: unexpected return lambda(&b).call #=> 42 ``` I'm not sure if the change was intentional or not, but this feature request is really about restoring lost behavior, not introducing new one. :-) ---------------------------------------- Feature #15973: Make it so Kernel#lambda always return a lambda https://bugs.ruby-lang.org/issues/15973#change-80396 * Author: alanwu (Alan Wu) * Status: Assigned * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: ---------------------------------------- When Kernel#lambda receives a Proc that is not a lambda, it returns it without modification. l propose changing `Kernel#lambda` so it always returns a lambda. Calling a method called lambda and having it effective do nothing was not very intuitive. https://github.com/ruby/ruby/pull/2262 Judging from marcandre's investigation here: https://bugs.ruby-lang.org/issues/15620#note-1 changing the behavior should not cause much breakage, if any. This also happens to fix [Bug #15620] -- https://bugs.ruby-lang.org/ Unsubscribe: