# inc.rb foo = "bar"; # main.rb require 'inc.rb' puts foo # NameError: undefined local variable or method `foo' for main:Object
如果你真的不想在符号上放置任何类型的装饰(因为你不喜欢它的读取方式,也许),一个常见的黑客只是将它定义为一种方法:def foo()“bar “ 结束.