Ruby idioms
You can write a complete ruby script as a string and run it. Ruby (rather MRI) would just evalutae the string by executing it. For example:
"#{def x(s); puts(s.reverse); end; ('1'..'3').each{|aStr| x(aStr)} }"
This is absolutely valid.
You can write a complete ruby script as a string and run it. Ruby (rather MRI) would just evalutae the string by executing it. For example:
"#{def x(s); puts(s.reverse); end; ('1'..'3').each{|aStr| x(aStr)} }"
This is absolutely valid.