Actions
Bug #20965
closed`it` vs `binding.local_variables`
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.4.0dev (2024-12-15T13:36:38Z master 366fd9642f) +PRISM [x86_64-linux]
Description
it
is not available in the list of binding.local_varaibles
, unlike numbered parameters:
p(proc { binding.local_variables }.call) # []
p(proc { |x| binding.local_variables }.call) # [:x]
p(proc { _1; binding.local_variables }.call) # [:_1]
p(proc { vars = binding.local_variables; _1; vars }.call) # [:_1, :vars]
p(proc { it; binding.local_variables }.call) # []
I wonder if it is deliberate or accidental.
Actions
Like0
Like0Like0Like3Like0Like0Like0