Skip to content

Instantly share code, notes, and snippets.

@larryv
Created March 11, 2012 07:09
Show Gist options
  • Save larryv/2015383 to your computer and use it in GitHub Desktop.
Save larryv/2015383 to your computer and use it in GitHub Desktop.
class Integer
def to_binary_s(n)
(n - 1).downto(0).inject("") {|str, i| str << self[i].to_s}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment