#!/usr/local/bin/ruby def foo(a, b) # a, b を「仮引数」という a += 1 b += 2 # a と b を変更する end x = 10 y = 20 foo(x, y) # x, y を「実引数」という puts x #=> 10 # 変更されてない puts y #=>