IM
Size: a a a
IM
E
SS
SS
E
E
SS
DE
AP
AP
IM
eval
сделать, тогда получитсяIM
irb(main):001:0> def hola(a, b, proc)
irb(main):002:1> puts "Here's #{a} and #{b}"
irb(main):003:1> result = a + b
irb(main):004:1> eval(proc)
irb(main):005:1> end
irb(main):010:0> hola(2, 3, <<~RUBY)
irb(main):011:1" puts "But there's also a result: \#{result}. It is a sum of \#{a} and \#{b}"
irb(main):012:1" RUBY
Here's 2 and 3
But there's also a result: 5. It is a sum of 2 and 3
AP
irb(main):001:0> def hola(a, b, proc)
irb(main):002:1> puts "Here's #{a} and #{b}"
irb(main):003:1> result = a + b
irb(main):004:1> eval(proc)
irb(main):005:1> end
irb(main):010:0> hola(2, 3, <<~RUBY)
irb(main):011:1" puts "But there's also a result: \#{result}. It is a sum of \#{a} and \#{b}"
irb(main):012:1" RUBY
Here's 2 and 3
But there's also a result: 5. It is a sum of 2 and 3
IM
В
AD
AD