在你不知道 Ruby 可以做的 10 件事中,幻灯片 30,James Edward Gray II 提到
ruby -e 'puts { is_this_a_block }' --dump parsetree
产生
###########################################################
## Do NOT use this node dump for any purpose other than ##
## debug and research. Compatibility is not guaranteed. ##
###########################################################
# @ NODE_SCOPE (line: 1)
# +- nd_tbl: (empty)
# +- nd_args:
# | (null node)
# +- nd_body:
# @ NODE_ITER (line: 1)
# +- nd_iter:
# | @ NODE_FCALL (line: 1)
# | +- nd_mid: :puts
# | +- nd_args:
# | (null node)
# +- nd_body:
# @ NODE_SCOPE (line: 1)
# +- nd_tbl: (empty)
# +- nd_args:
# | (null node)
# +- nd_body:
# @ NODE_VCALL (line: 1)
# +- nd_mid: :is_this_a_block
这里输出的信息在运行时可用吗?如果是这样,这些信息是否仅代表已写下的代码,还是包含已完成的任何元编程的结果?