From: XrXr@... Date: 2019-07-08T00:35:09+00:00 Subject: [ruby-core:93598] [Ruby master Feature#15973] Make it so Kernel#lambda always return a lambda Issue #15973 has been updated by alanwu (Alan Wu). I would also like to note that if we revert back to the behavior in 2.4, code that relied on `lambda` without block will not have an easy upgrade path. ```ruby def make_a_lambda lambda end ``` is not equivalent to ```ruby def make_a_lambda(&block) lambda(&block) end ``` under 2.4 spec. ---------------------------------------- Feature #15973: Make it so Kernel#lambda always return a lambda https://bugs.ruby-lang.org/issues/15973#change-79190 * Author: alanwu (Alan Wu) * Status: Open * Priority: Normal * Assignee: * 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: