Sha256: e40d7cb2139a2ecec5e340c0cdaa3b6cfcdbdaf267e4e5cc4c80f286d0cbe2e2
Contents?: true
Size: 442 Bytes
Versions: 10
Compression:
Stored size: 442 Bytes
Contents
class Symbol unless method_defined?(:succ) # 1.9+ TODO: is this right? # Successor method for symobol. This simply converts # the symbol to a string uses String#succ and then # converts it back to a symbol. # # :a.succ #=> :b # # TODO: Make this work more like a simple character dial? def succ(n=1) s = self.to_s n.times do s = s.succ end s.to_sym end end end
Version data entries
10 entries across 9 versions & 2 rubygems