Sha256: d02bdac4d60299f3a0d25ac512fcc6d25229b30dc4e4f622631c3c428d64740e

Contents?: true

Size: 140 Bytes

Versions: 5

Compression:

Stored size: 140 Bytes

Contents

# coding: utf-8
class Integer
  def palindrome?(base=10)
    base(base) == base(base).reverse
  end

  alias :palindromic? :palindrome?
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
numb-0.186.0 lib/numb/palindrome.rb
numb-0.185.0 lib/numb/palindrome.rb
numb-0.184.0 lib/numb/palindrome.rb
numb-0.181.0 lib/numb/palindrome.rb
numb-0.170.0 lib/numb/palindrome.rb