Sha256: 877ecf6a675ea6c01819fbe4dde1482395f2ada41e67a9e76bb0cf4fa8e17f84
Contents?: true
Size: 428 Bytes
Versions: 1
Compression:
Stored size: 428 Bytes
Contents
# Copyright (C) 2004-2005 Kouichirou Eto, All rights reserved. =begin # only for Ruby 1.6 class Array def fetch(n) a = self[n] if a.nil? a = yield end a end end module Enumerable def sort_by self.collect {|i| [yield(i), i]}. sort {|a,b| a[0] <=> b[0]}. collect! {|i| i[1]} end end alias org_exit exit def exit(n) n = 0 if n == true n = 1 if n == false org_exit(n) end =end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sgl-0.3.1 | test/test_module_ruby16.rb |