Ruby to_s method

puts("10000" + 0)

I can't do this.

Therefore, the "to_s" method is used.

puts("10000" + 0.to_s)

Now you can display the numbers in the string together.

Recommended Posts

Ruby to_s method
[Ruby] slice method
[Ruby] end_with? method
[Ruby] Method memorandum
[Ruby basics] split method and to_s method
[Ruby] initialize method
Ruby build method
Ruby accessor method
ruby map method
Ruby Learning # 30 Initialize Method
abbreviation for ruby method
Ruby Learning # 24 Exponent Method
Ruby Thread # [] = method notes
definition of ruby method
[Ruby] Method definition summary
About the to_s method.
Method
Integer check method with ruby
Ruby algorithm (inject, method definition)
[Ruby] Notes on gets method
[Ruby] Method that returns truth
[ruby] Method call with argument
Ruby design pattern template method pattern memo
[Ruby] Method to count specific characters
[Ruby] present/blank method and postfix if.
[Ruby] Extracting elements with slice method
[Ruby] How to use any? Method
String output method memo in Ruby
[Ruby] Search problem using index method
[Ruby on Rails] Convenient helper method
[Ruby] undefined method `dark?'occurs in rqr_code
How to use Ruby inject method
Ruby learning 4
[Ruby] Array
Java method
[Ruby] Obtaining even values ​​using the even? Method
to_i method
Ruby basics
Ruby learning 5
Ruby basics
java (method)
Ruby Review 2
getRequestDispatcher () method
Ruby addition
merge method
Refactoring Ruby
Ruby on Rails installation method [Mac edition]
[Ruby] From the basics to the inject method
Ruby learning 3
Implemented "Floyd Cycle Detection Method" in Ruby
Map method
include method
Abstract method
Ruby print puts p printf output method
initialize method
List method
puts method
Ruby setting 2
ruby Exercise Memo II (variable and method)
Java method
Class method