Skip to content

Commit

Permalink
adding some files
Browse files Browse the repository at this point in the history
  • Loading branch information
Karthikeyan A K committed Jan 27, 2016
1 parent f79b4bd commit 022efca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions array_copy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# array_copy.rb

def array_changer array
array << 6
end

some_array = [1, 2, 3, 4, 5]
p some_array
array_changer Marshal.load(Marshal.dump(some_array))
p some_array
10 changes: 10 additions & 0 deletions array_passed_to_function.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# array_passed_to_function.rb

def array_changer array
array << 6
end

some_array = [1, 2, 3, 4, 5]
p some_array
array_changer some_array
p some_array

0 comments on commit 022efca

Please sign in to comment.