varA = 0varB = 0 def calc(a,b) b += a puts "#{b}"end varA = 1calc(varA,varB)puts "#{varB}"
Standard input is empty
1 0
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!