ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: t@iyosli.me
To: ruby-core@ruby-lang.org
Subject: [ruby-core:100445] [Ruby master Bug#17193] Endless method definition doesn't work with lambdas in IRB
Date: Tue, 20 Oct 2020 15:22:06 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-88064.20201020152204.44095@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-17193.20200926072259.44095@ruby-lang.org

Issue #17193 has been updated by taiyoslime (Taiyo Mizuhashi).


This seems to be fixed in https://github.com/ruby/irb/pull/131. Please check it out.

----------------------------------------
Bug #17193: Endless method definition doesn't work with lambdas in IRB
https://bugs.ruby-lang.org/issues/17193#change-88064

* Author: kodnin (David Boot)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.0.0preview1 (2020-09-25 master 0096d2b895) [x86_64-darwin19]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
Endless method definition doesn't work with lambdas. Please check the attached screenshot.

``` ruby
def foo() = 123
# => :foo

foo
# => 123

def bar() = lambda { |x| x * x }
# I expected the method to be defined.

def bar() = ->(x) { x * x }
# Same issue.
```

Nice to have:

``` ruby
def bar = lambda { |x| x * x }
def bar = ->(x) { x * x }
```

---Files--------------------------------
Screenshot 2020-09-26 at 09.19.24.png (714 KB)


-- 
https://bugs.ruby-lang.org/

  parent reply	other threads:[~2020-10-20 15:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-26  7:23 [ruby-core:100166] [Ruby master Bug#17193] Endless method definition doesn't work with lambdas kodnin
2020-09-26  7:30 ` [ruby-core:100167] " s.wanabe
2020-09-26  7:40 ` [ruby-core:100168] " kodnin
2020-10-20 15:22 ` t [this message]
2021-01-05 19:43 ` [ruby-core:101937] [Ruby master Bug#17193] Endless method definition doesn't work with lambdas in IRB aycabta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-88064.20201020152204.44095@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).