str = "Hello GG"
str.tap {|x| puts "str : #{x}"}
.each_char.tap {|x| puts "each_char : #{x}"}
.sort.tap {|x| puts "sort : #{x}"}
Output
str : Hello GG each_char : # sort : [" ", "G", "G", "H", "e", "l", "l", "o"]
str = "Hello GG"
str.tap {|x| puts "str : #{x}"}
.each_char.tap {|x| puts "each_char : #{x}"}
.sort.tap {|x| puts "sort : #{x}"}
Output
str : Hello GG each_char : # sort : [" ", "G", "G", "H", "e", "l", "l", "o"]