From: "ufuk (Ufuk Kayserilioglu) via ruby-core" Date: 2026-04-06T16:47:48+00:00 Subject: [ruby-core:125204] [Ruby Bug#21983] RubyVM::AST no way to find &nil Issue #21983 has been updated by ufuk (Ufuk Kayserilioglu). I am guessing that the `&nil` case should read `block: false` by comparing it to the `**nil` case: ```shell ��� ruby -e 'pp RubyVM::AbstractSyntaxTree.parse("def foo(**nil); end")' (SCOPE@1:0-1:19 tbl: [] args: nil body: (DEFN@1:0-1:19 mid: :foo body: (SCOPE@1:0-1:19 tbl: [] args: (ARGS@1:8-1:13 pre_num: 0 pre_init: nil opt: nil first_post: nil post_num: 0 post_init: nil rest: nil kw: false kwrest: false block: nil) body: nil))) ``` ---------------------------------------- Bug #21983: RubyVM::AST no way to find &nil https://bugs.ruby-lang.org/issues/21983#change-116937 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- ``` $ ./ruby -e 'pp RubyVM::AbstractSyntaxTree.parse("def foo(&nil); end")' (SCOPE@1:0-1:18 tbl: [] args: nil body: (DEFN@1:0-1:18 mid: :foo body: (SCOPE@1:0-1:18 tbl: [] args: (ARGS@1:8-1:12 pre_num: 0 pre_init: nil opt: nil first_post: nil post_num: 0 post_init: nil rest: nil kw: nil kwrest: nil block: nil) body: nil))) $ ./ruby -e 'pp RubyVM::AbstractSyntaxTree.parse("def foo(); end")' (SCOPE@1:0-1:14 tbl: [] args: nil body: (DEFN@1:0-1:14 mid: :foo body: (SCOPE@1:0-1:14 tbl: [] args: (ARGS@1:8-1:8 pre_num: 0 pre_init: nil opt: nil first_post: nil post_num: 0 post_init: nil rest: nil kw: nil kwrest: nil block: nil) body: nil))) $ ``` The bodies are exactly the same here. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/