On various sites, it was written as "a method to execute a character string given as an argument as a Ruby program", but I have a poor understanding, "Well then, isn't the usual character string Ruby?" I thought about it ... (completely stupid)
Ruby
1-1
1+1
1*1
1/1
10+10
Ruby
puts eval gets
puts eval gets
puts eval gets
puts eval gets
eval "puts gets"
Ruby
0
2
1
1
10+10
Only this ... I didn't understand this (despair)
Recommended Posts