From: Eugene Scripnik Date: 2002-02-07T00:28:19+09:00 Subject: Re: eval_wrap Wednesday, February 06, 2002, 3:34:53 PM, you wrote: >>>>>> "E" == Eugene Scripnik writes: E>> Is there any difference for my scripts to not be evaluated as E>> toplevel? t> pigeon% cat ff.rb t> class Array t> def uu t> end t> end t> p Array.instance_methods t> pigeon% t> pigeon% cat b.rb t> #!/usr/bin/ruby t> load "ff.rb", true t> p Array.instance_methods t> pigeon% t> pigeon% b.rb t> ["uu"] t> ["<=>", "first", "sort", "==", "nitems", "replace", "fill", "size", "indices", "delete", "&", "===", "inspect", "flatten", "index", "clone", "reject!", "reverse_each", "collect", "reverse!", t> "unshift", "each", "to_a", "compact", "delete_at", "*", "uniq", "map!", "pop", "include?", "+", "eql?", "empty?", "sort!", "last", "-", "slice", "assoc", "concat", "flatten!", "rindex", "clear", t> "length", "indexes", "join", "at", "[]", "delete_if", "[]=", "each_index", "reverse", "to_s", "compact!", "<<", "pack", "frozen?", "uniq!", "filter", "shift", "|", "slice!", "rassoc", "to_ary", t> "hash", "collect!", "push"] t> pigeon% I don't really understand your example, why Array.instance_methods in ff.rb loaded by b.rb have only one instance method?? By the way: Module.new.module_eval { class Array def uu end end p Array.instance_methods } p Array.instance_methods produces the same output... -- Best regards, Eugene [team Enticla] mailto:Eugene.Scripnik@itgrp.net