lib/core/facets/symbol/succ.rb in facets-2.8.4 vs lib/core/facets/symbol/succ.rb in facets-2.9.0.pre.1

- old
+ new

@@ -4,15 +4,19 @@ # 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 + # :a.succ #=> :b # # TODO: Make this work more like a simple character dial? - def succ - self.to_s.succ.intern + def succ(n=1) + s = self.to_s + n.times do + s = s.succ + end + s.to_sym end end end