[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
This commit is contained in:
Koichi ITO 2024-07-17 21:29:08 +09:00 committed by git
parent 7de2c06352
commit 0fe816f380

View File

@ -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: