Sha256: 6a3b6e494b9878edd26a9a11f900b9ed869186dd1823b6ea9550ffeab858f338
Contents?: true
Size: 587 Bytes
Versions: 19
Compression:
Stored size: 587 Bytes
Contents
class Array # "Put On Top". This is an alias for unshift # which puts an object# on top of the stack. # It is the converse of push. # # a=[1,2,3] # a.pot(9) #=> [9,1,2,3] # a #=> [9,1,2,3] # alias_method( :pot, :unshift ) end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TCArray < Test::Unit::TestCase def test_slap a = [2,3] assert_equal( [1,2,3], a.pot(1) ) assert_equal( [4,1,2,3], a.pot(4) ) end end =end
Version data entries
19 entries across 19 versions & 1 rubygems