From: "Mauricio Fernández" Date: 2003-07-18T02:29:39+09:00 Subject: Re: instance_eval("class") error/bug??? On Fri, Jul 18, 2003 at 02:22:07AM +0900, walter@mwsewall.com wrote: > if I try someObject.instance_eval("class") I get : > > in `instance_eval': (eval):1:in `instance_eval': compile error > (SyntaxError) > (eval):1: syntax error > class > > I am using PragProgs install for 1.8 for Windows. Is this expected > or a bug? I guess it's expected, you'd have to do self.class to make it work: >> class SyntaxError: compile error (irb):1: syntax error from (irb):1 >> type (irb):3: warning: Object#type is deprecated; use Object#class => Object >> "a".instance_eval{self.class} => String -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com win-nt from the people who invented edlin. -- MaDsen Wikholm, mwikholm@at8.abo.fi