〖Ruby〗Ruby关键字

模块定义:module
类定义:class
方法定义:def, undef
检查类型:defined?
条件语句:if, then, else, elsif, case, when, unless
循环语句:for, in, while, until, next, break, do, redo, retry, yield
逻辑判断:and, or, not
逻辑和空值:true, false, nil
异常处理:rescue, ensure
对象引用:super, self
块的起始:begin/end
嵌入模块:BEGIN/END
文件相关:__FILE__, __LINE__
方法返回:return
别名:alias
BEGIN模块相当于C语言中的宏,END模块用来做一些收尾工作,有了require,include,应该取消BEGIN和END的语法定义。
原文地址:https://www.cnblogs.com/scue/p/3381047.html