fork download
  1. varA = 0
  2. varB = 0
  3.  
  4. def calc(a,b)
  5. b += a
  6. puts "#{b}"
  7. end
  8.  
  9. varA = 1
  10. calc(varA,varB)
  11. puts "#{varB}"
Success #stdin #stdout 0.01s 7408KB
stdin
Standard input is empty
stdout
1
0