dgtized (owner)

Revisions

gist: 146495 Download_button fork
public
Public Clone URL: git://gist.github.com/146495.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$ git diff
diff --git a/kernel/common/array.rb b/kernel/common/array.rb
index ec84eb0..1667b95 100644
--- a/kernel/common/array.rb
+++ b/kernel/common/array.rb
@@ -927,8 +927,12 @@ class Array
   # Appends the given object(s) to the Array and returns
   # the modified self.
   def push(*args)
- args.each { |ent| self << ent }
- self
+ if(args.size < (@tuple.size - @start - @total))
+ args.each {|x| self << x }
+ self
+ else
+ concat args
+ end
   end
 
   # Searches through contained Arrays within the Array,