Software Development
Pages
Home
About
Contact
Monday, January 11, 2016
Changing Self inside the Block
(1..10).tap {|x| puts "original: #{x.inspect}"}.tap {|x| puts "Original class: #{x.class}"}.to_a.tap {|x| puts "array: #{x.inspect}"}.tap {|x| puts "After class: #{x.class}"}
Newer Post
Older Post
Home