On Behalf Of Damjan Rems:
# a1=10
# r= ?('a' + '1')  # ? is whatever, r should have value 10

some simple ways,

A. using eval
>> a1=10
=> 10
>> macro="a1+1"
=> "a1+1"
>> eval(macro)
=> 11

B. using proc or lambda
>> macro2 = proc{a1+1}
=> #<Proc:0xb7dd6bcc@(irb):7>
>> a1=100
=> 100
>> macro2.call
=> 101

C. using string interpolation
>> puts "a1+1=#{a1+1}"
a1+1=101
=> nil

pls test them further; i usually make stupid replies.

kind regards -botp