I have a problem with verifying table on page 30. IMHO presenting such a data without giving an exact methodology is not a good idea. There should be provided a ruby script which collected this data. Based on chp2/iterator_each1.rb and chp2/iterator_each2.rb examples I wrote one: https://gist.github.com/radarek/174eb80460d828655cb8
I attached results for ruby 2.1.5, 2.2.4 and 2.3.0. As you can see none of them are in line with results from the table and what is more interesting ruby 2.3.0 doesn’t create T_NODE objects for any of tested methods. It means they were optimized or this methodology is wrong for 2.3.0.
I also don’t know what ‘-‘ (dash) in the table mean. It can’t mean that method doesn’t exist in given class because for example fill method exists in Array class. Maybe Enum and Array was exchanged by mistake?