From: Barson Date: 2005-10-12T00:11:53+09:00 Subject: Re: comments found in ObjectSpace Oh, yeah, I know that. have a look at line 4525 or in the text file, search for the following string without the double quotes: "# without specifying the format" "Robert Klemme" wrote in message news:3r22kqFg2irsU1@individual.net... > Barson wrote: > > I'm not sure what that code is supposed to do. Using my code, the > > text file (around 152kb) that was produced contained a lot of > > comments, especially from the Date class. > > These are no comments. > > 17:03:49 [source]: ruby -e 'ObjectSpace.each_object {|o| print o.class, " > ", o.to_s.inspect, " ", o.inspect, "\n" if /^#/ =~ o.to_s }' > Binding "#" # > IO "#" # > IO "#" # > IO "#" # > Thread "#" # > ThreadGroup "#" # > > 17:03:54 [source]: ruby -r date -e 'ObjectSpace.each_object {|o| print > o.class, " ", o.to_s.inspect, " ", o.inspect, "\n" if /^#/ =~ o.to_s }' > File "#" # > String "#<%s: %s,%s,%s>" "#<%s: %s,%s,%s>" > File "#" # > Binding "#" # > IO "#" # > IO "#" # > IO "#" # > Thread "#" # > ThreadGroup "#" # > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > MatchData "#" # > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > MatchData "#" # > String "#" "#" > String "#" "#" > String "#" "#" > String "#" "#" > MatchData "#" # > String "#" "#" > String "#" > "#" > String "#" "#" > String "#" "#" > MatchData "#" # > String "#" "#" > String "#<%s: %s,%s,%s>" "#<%s: %s,%s,%s>" > MatchData "#" # > String "#" > "#" > String "#" "#" > String "#" "#" > MatchData "#" # > String "#" "#" > String "#new_offset" "#new_offset" > String "#newof is deprecated; " "#newof is deprecated; " > String "#offset" "#offset" > String "#of is deprecated; " "#of is deprecated; " > String "#new_start" "#new_start" > String "#newsg is deprecated; " "#newsg is deprecated; " > String "#start" "#start" > String "#sg is deprecated; " "#sg is deprecated; " > String "# alias_method :format, :strftime\n" "# alias_method :format, > :strftime\n" > String "# $Id: format.rb,v 2.14 2004-11-06 10:58:40+09 tadf Exp $\n" "# > $Id: format.rb,v 2.14 2004-11-06 10:58:40+09 tadf Exp $\n" > String "# format.rb: Written by Tadayoshi Funaba 1999-2004\n" "# > format.rb: Written by Tadayoshi Funaba 1999-2004\n" > File "#" # (closed)> > 17:03:55 [source]: > > Kind regards > > robert >