From: "Charles L. Snyder" Date: 2005-06-27T07:15:39+09:00 Subject: newbie scope question Hi, Thank you answers to my previous question(s) ! Why does this not work? doc = File::open("my.txt") class Crap def junko @doc = doc @doc.each {|line| print line} end end myobj=Crap.new myobj.junko The segment below does work - I just don't quite understand why the Crap object can't 'see' the txt file in the above example... doc = File::open("my.txt") class Crap def junko(a) a.each {|line| print line} end end myobj=Crap.new myobj.junko(doc) Thanks in advance