diff options
author | Patrick Simianer <p@simianer.de> | 2014-06-14 16:46:27 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-06-14 16:46:27 +0200 |
commit | 26c490f404731d053a6205719b6246502c07b449 (patch) | |
tree | 3aa721098f1251dfbf2249ecd2736434c13b1d48 /ruby/call_by_reference.rb |
init
Diffstat (limited to 'ruby/call_by_reference.rb')
-rwxr-xr-x | ruby/call_by_reference.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ruby/call_by_reference.rb b/ruby/call_by_reference.rb new file mode 100755 index 0000000..12dc933 --- /dev/null +++ b/ruby/call_by_reference.rb @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby + + +def fun w + w << "x" +end + + +w = [1,3,4,5] + +fun w + +puts w.to_s + |