0043 To_h

Convert to Hash

to_h is the only to_... like method to accept a block! This avoids the need for an intermediate array, which was often necessary before conversion! The proposal was initially rejected for lack of a better name.

0043-to_h_1.png

Links to Ruby documentation for to_h and the history of issue 15143.