2

Rubinius では、

rbx-head > Object.instance_methods.grep(/^_.*/)
 => ["__extend__", "__show__", "__marshal__", "__instance_of__", "__instance_variable_get__", "__send__", "__id__", "__instance_variable_set__", "__respond_to_eh__", "__instance_variables__", "__class__", "__kind_of__", "__instance_variable_defined_eh__", "__nil__", "__metaclass__", "__fixnum__", "__method__"] 

と が含まれ"__respond_to_eh__"ます"__instance_variable_defined_eh__"

つまり、これは Rubinius の人々が で台無しにすべきではないメソッド名をラップしたいためであり、メソッド名の末尾の前で__使用することは許可されていませんね??

4

1 に答える 1

0

彼らのコメントによると、彼らは現在、他のどこでもそうであるように述語内でandを使用するように変更されています。__instance_variable_defined_p____respond_to_p__

うーん。

于 2011-01-20T20:21:01.517 に答える