From: Benoit Cerrina Date: 2001-11-02T05:39:03+09:00 Subject: [ruby-talk:24115] Re: specifying the file and line "Minero Aoki" wrote in message news:20011101205112P.aamine@mx.edit.ne.jp... > > In mail "[ruby-talk:24073] specifying the file and line" > "Benoit Cerrina" wrote: > > > Hi, > > is there a way to specify the file and line of a ruby program, > > this is specially usefull for evals in an embedded interpreter. > > In perl I do > > # line 352 \"if_perl.xs\" > > Try this. > > eval <<-End, nil, 'somefilename.rb', 777 > raise # to show lineno > End > > module_eval/instance_eval has same feature. > > module_eval <<-End, 'somefilename.rb', 777 > raise > End > > instance_eval <<-End, 'somefilename.rb', 777 > raise > End > > > Minero Aoki > > Thanks it works except I'm embedding ruby and in c and I use the rb_eval_string_protect... Benoit