Skip to content

Commit

Permalink
Fix ruby-parse example
Browse files Browse the repository at this point in the history
Without `--legacy`, it would return `kwargs`, not `hash`:

    (send
      (const nil :Comment) :new
      (kwargs
        (pair
          (sym :user)
          (send nil :current_user))))
  • Loading branch information
pirj committed May 21, 2023
1 parent 580ee7d commit 9d451af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/node_pattern.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ current symbol is being called from an initialization method, like:

[source,sh]
----
$ ruby-parse -e 'Comment.new(user: current_user)'
$ ruby-parse --legacy -e 'Comment.new(user: current_user)'
(send
(const nil :Comment) :new
(hash
Expand Down

0 comments on commit 9d451af

Please sign in to comment.