可能是什么可能的原因?什么是可能的原因需要一个文件,但它并没有跑
#wordlist.rb
code_words = {
'starmonkeys' => 'Phil and Pete, those prickly chancellors of the New Reich',
'catapult' => 'chucky go-go', 'firebomb' => 'Heat-Assisted Living',
'Nigeria' => "Ny and Jerry's Dry Cleaning (with Donuts)",
'Put the kabosh on' => 'Put the cable box on'
}
irb(main):001:0> require 'wordlist.rb'
=> true
irb(main):002:0> code_words
NameError: undefined local variable or method `code_words' for main:Object
from (irb):2
from :0
但是这段代码在里面很辛苦......嗯,他们错了? – wizztjh 2011-01-14 03:27:41