SyntaxFix
Write A Post
Hire A Developer
Questions
You can give to_s a base other than 10:
to_s
10.to_s(16) #=> "a"
Note that in ruby 2.4 FixNum and BigNum were unified in the Integer class. If you are using an older ruby check the documentation of FixNum#to_s and BigNum#to_s
FixNum
BigNum
Integer