LoginSignup
1
1

More than 5 years have passed since last update.

Ruby初学者向けの注意点

Last updated at Posted at 2017-08-07

不等号

不等号の「<>」が使えない
→代わりに「!=」を使う

変数展開

age = 20
puts age + "歳です"

上記はNGです

age = 20
puts "#{age}歳です"

上記のように記述します

VBからのRubyに来た人向け

まあ、私ですw

if XXX
end if

上記は間違いです

if XXX
end

上記が正しい記述です、間違えそうですw

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1