diff options
author | Koichi ITO <[email protected]> | 2024-07-17 21:29:08 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-07-17 18:17:59 +0000 |
commit | 0fe816f3808cdf647ac549a8ddb2e0540320b890 (patch) | |
tree | e7e00392c076045aa477fa572cda803fbb20a383 | |
parent | 7de2c06352be3370e4fc51612bee35b2e6eacf4b (diff) |
[ruby/prism] [Doc] Tweak example of `Prism::Dispatcher`
This PR tweaked the documentation to correct an error encountered
when running the example code of `Prism::Dispatcher`.
This aims to make understanding the example smoother.
https://github.com/ruby/prism/commit/165a1a0e78
-rw-r--r-- | prism/templates/lib/prism/dispatcher.rb.erb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/prism/templates/lib/prism/dispatcher.rb.erb b/prism/templates/lib/prism/dispatcher.rb.erb index 1370ca7636..0db0003464 100644 --- a/prism/templates/lib/prism/dispatcher.rb.erb +++ b/prism/templates/lib/prism/dispatcher.rb.erb @@ -14,7 +14,8 @@ module Prism # end # end # - # dispatcher = Dispatcher.new + # listener = OctalListener.new + # dispatcher = Prism::Dispatcher.new # dispatcher.register(listener, :on_integer_node_enter) # # Then, you can walk any number of trees and dispatch events to the listeners: |