Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (19 sloc) 708 Bytes
Collection of utilities to make ruby ...more friendly from the get-go [really things that *should* have been added to core, because of immense convenience]
Currently this includes:
require_rel glob
* require a file relative to the current file, i.e.
>> require_rel 'lib/filename'
Object#in?
# ex:
>> 3.in? [1,2,3]
=> true
println
like print, but with a carriage return at the end:
>> println 1,2,3
(prints 123\n)
enumerable-extra
#new enumerable #map
>> [1,2,3].map(:to_s) # applies it automatically! far less ugly than [1,2,3].map &:to_s
=> ["1", "2", "3"]
and Thread.abort_on_exception=true # kill program if a child thread dies--alert you earlier!
Don't leave home without these!