学习Ruby 我对Ruby的学习笔记 评论 #i'm a sinlg eline comment =begin I'm a multiline comment! =end 资料来源 puts(writeln) 控制台输出/打印的Ruby方式 puts "hello world" 编写问候世界并返回nil 打印(写) 字符串方法:长度,反向,大写,小写 puts "doruk" . length #5 puts "doruk" . reverse #kurod puts "doruk" . upcase # DORUK puts "doruk" . downcase #doruk 零