Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Rubyの二重引用符""と単一引用符の違いは何ですか?''
""
''
私が見た限り、これは好みの選択にすぎないようであり、2 つが誤って混合されない限り、機能に変化はありません"Some String'。
"Some String'
二重引用符は補間します。
一重引用符は、たとえば、
puts "Hi #{42+5}" => "Hi 47" puts 'Hi #{42+5}' => "Hi #{42+5}"