Ruby提供了相当于Perl的严格使用吗?

我的意思是,Ruby中没有我的.我发现在Perl中使用严格来提供非常好的反错字保护.

解决方法

The strict pragma does three things in Perl. Two of the items are to
forbid the use of symbolic references and “barewords.” Ruby doesn’t
support these features,so it’s not an issue.

The other feature of the strict pragma is to avoid creating random
global variables every time one is mentioned. In Ruby,globals look
different from other variables (the leading $),so this is not really
a problem. Local variables need to be assigned to before use,since
that’s Ruby’s method of declaration. That solves the same problem
the strict pragma handles for Perl.

资料来源:https://groups.google.com/forum/?fromgroups#!topic/ruby-talk-google/PiRnWplvGDw

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...