57448-60000 subjects 57946-58846

Re: MultiMap
57695 [gfb@to es ft] What if you use Hash instead of Array as a value of self[key]? Then, as keys

Re: Enumerable#map_with_indices (was Re: Conditional block operations)
57717 [dblack@ca dl] It was more a hint to Matz, though I think mwi is off the table :-)  As
57718 [hal9000@hy e] operations)
57737 [batsman.geo@] c = (0...a.size).map {|i| a[i] + b[i]}

[Mac OS X] get an IE 5 screenshot
57740 [tobiasreif@p] I need to script MS Internet Explorer to visit a given page (URL given

Re: speeding up ...
57741 [aleksei.guze] What are You measuring Ruby's speed for?
+ 57745 [eban@os ri .] Don't use Arrary#each.
| 57782 [probertm@no ] Interesting.
| 57818 [ysantoso@je ] ...
+ 57779 [probertm@no ] Fun.  I find that Ruby is "fast enough" for almost all of my work.

Re: require 'tk' causes segfault later
57743 [robertm@sp l] Which version of Ruby are you using and on which platform?
57815 [ptkwt@sh ll ] ruby 1.6.7 (2002-03-01) [i686-linux-gnu]

"methods" method
57744 [xrfang@ho ma] I tried String.methods-Kernel.methods in irb, found that most methods of
+ 57746 [decoux@mo lo] No, you have found that it exist method with the same name in Kernel and
+ 57747 [gsinclair@so] $_.X           ($_ is a String) or
+ 57748 [daniel.nicau] I try ti answer with my poor english ;)
+ 57749 [nobu.nokada@] Note that String.methods returns singleton methods of String.
| 57751 [xrfang@ho ma] an object's hierachy. I think it may be used for auto-completion. RDE's
+ 57753 [kjana@dm la ] Hm, you should try `String.instance_methods-Kernel.instance_methods'

speed test
57754 [xrfang@ho ma] I did some simple speed test (See below), found that
57758 [m_libby@an s] I answer benchmarking concerns below

57756 [dcarrera@ma ] Could someone tell me how the Ruby 'install.rb' scripts work?
57757 [decoux@mo lo] For an extension
+ 57759 [dcarrera@ma ] Half my frustration comes from the fact that this didn't work.
| 57763 [batsman.geo@] It should work. Perhaps you lack some library required for development,
+ 57760 [dcarrera@ma ] Correction.
| 57792 [lyle@us rs s] There is no "official" procedure for building Ruby packages that include
+ 57767 [ndrsbngtssn@] I'll have to join Daniel Carrera in complaining. What is really the
  + 57805 [ptkwt@sh ll ] Exactly my gripe as well!  Why can't the install script do the
  + 57809 [aamine@lo er] Because it is a common, flexible procedure.
    57811 [ndrsbngtssn@] How do you then configure Ruby to find the packages there? Could that
    58044 [aamine@lo er] You can use environment variable $RUBYLIB for such purpose.

57762 [xrfang@ho ma] Is it possible to write my own destructor in ruby? I used ADODB.Connection
57820 [ysantoso@je ] See http://www.rubygarden.org/ruby?GCAndMemoryManagement , the 2nd to
57823 [ted@da ac mm] To clarify: the antepenultimate paragraph. ;-D

About the Ruby book for beginners discussion ...
57768 [mvondung@gm ] I mentioned this in response to another message (I wish the mailing
57774 [JRH@ta is co] I second this.  I'm not a complete beginner - I have some perl

Matz's slides
57769 [dali@in ul .] I saw the new Matz's slides from Ruby Conference 2002 at www.ruby-lang.org.
57771 [matz@ru y- a] Sorry, it's still secret. ;-)
+ 57773 [robertm@sp l] I was hoping that the following would work, but it seems there is a
| 57843 [    s@xs .d ] This is no surprise to me, as I'd consider Matz to be
+ 57817 [dan@si he or] Oh, sure, be secretive. We know the Scheme folks got to you at LL2
  57920 [matz@ru y- a] And a week before, Squeak folks brainwashed me to use their VM.
  58028 [dan@si he or] Of course not--we wouldn't do anything like that. Besides, we parrot

Vim like ruby interpreter?
57772 [Michael.Garr] being a vimmer and a newbie to ruby I have come across the need for the
57775 [gfb@to es ft] Compile irb with readline, create file ~/.inputrc and put
57781 [Michael.Garr] Thank you for the quick response but...
+ 57787 [Michael.Garr] [local]frisco:mgarriss:~/dev/jts> irb --readline
| + 57796 [gfb@to es ft] That's exactly what I am having on Solaris right now (no problems on Linux).
| + 57804 [gfb@to es ft] I got it finally.
+ 57830 [harryo@zi .c] I think this may be the default.  I'm pretty sure I've never done any editing

Solaris and ruby libraries
57776 [ms@ia ta e. ] Are there any well-known gotchas/pitfalls when configuring and compiling
+ 57778 [Michael.Garr] I have no problems with Ruby on Solaris yet.  But I have GNU/Linux like set
+ 57785 [djberge@qw s] I've found that if you comment out the "socket" lib in the ext/Setup file
| 57788 [decoux@mo lo] From the README
+ 57810 [ms@ia ta e. ] Thanks for the replies.  I'll pass the information along and see if any
  58143 [ms@ia ta e. ] Well, they reinstalled it and all was fine.  They must have done

Best way to read data?
57777 [christopher.] What's the best Ruby idiom for reading data from a data file one line at a time
+ 57780 [mwilson13@co] I have read that a good way is using ARGF.
+ 57786 [billk@ct .c ] while(line = gets)
  57791 [christopher.] Bill,
  + 57797 [billk@ct .c ] Hmm...
  | + 57798 [helgaorg@ya ] Interesting.
  | | 57801 [dblack@ca dl] Maybe if it's running as an executable without a #! line
  | + 57800 [billk@ct .c ] Ahh!  Oops, yes, if I invoke test2.rb directly, instead of running ruby
  | + 57872 [tsiivola@cc ] Maybe you should try without the doule-quotes, unless the filename has
  + 57909 [nobu.nokada@] It's a problem of cmd.exe which doesn't pass the standard input

Newbie: Benchmark module?
57783 [christopher.] Where do I acquire, and how do I use the benchmark module?
57799 [vjoel@PA H. ] Is this the one you mean?

Ruby for the Nuby
57789 [nemo@he lo r] As Daniel Carrera is doing, I am also writing a tutorial; it can be found

RubyGarden wiki question
57790 [nemo@he lo r] I'm having a wiki formatting problem.  In Opera (Windows version 6.05), the

Ideas for simple programming exercises...
57795 [christopher.] Ideas for simple programming exercises to help a new Ruby user become familiar
+ 57904 [mikkelfj-ant] familiar
+ 57921 [spoon@de la ] Look in the 'Quiz Archive' section. While these were

Ruby-on-Ruby editors [Was: Ruby Book...]
57806 [phlip_cpp@ya] Hmm. FreeRIDE beat me to the critical mass there (and to rather epic
57807 [dblack@ca dl] What is BDUF?  Is it good? :-)
57831 [lyle@us rs s] Big Design Up Front.
57861 [brian@co ln ] Just a stray thought here.  I hope nobody's offended if there end up
58032 [phlip_cpp@ya] We can either avoid re-invent the wheel, meaning we bond to some GUI
58067 [dblack@ca dl] There has to be a "squeaky wheel gets the grease" joke in here
58072 [brian@co ln ] Laziness, of course.  I try to reinvent enough wheels in my programming,

irb seg fault with latest ruby build on solaris
57808 [jim@fr ez .o] I just did a cvs get and compiled 1.7.3. When running irb
57812 [jim@fr ez .o] BTW, I just tested this on FreeBSD and irb works fine.

[ANN] ratlast 0.1 -- embedded FORTH in Ruby
57816 [probertm@no ] Rubyists,
+ 57819 [rich@li hi o] Mark,
| 57836 [probertm@no ] Thank for your interest.
| + 57840 [vjoel@PA H. ] I like this idea. It's possible to generate C code, compile it, and load
| | 57907 [probertm@ac ] Indirect threading, I think.  To tell you the truth, I haven't
| + 57931 [ptkwt@sh ll ] Actually, that's easy to do using Ruby. ;-)
|   58006 [probertm@no ] Do tell ... :-)
|   + 58007 [walker@de fc] require 'drb'
|   + 58029 [probertm@no ] Thank you.  I didn't know that drb existed.
+ 57838 [harryo@zi .c] Ah, yes, I can see how that's so much more intuitive than ...
| + 57850 [probertm@ac ] hmmmmm.
| | 57852 [vjoel@PA H. ] But closures can do something quite different--they can share a variable
| | 57910 [probertm@ac ] This is also (almost) true of the Forth code.  Here, the binding
| + 57943 [drbrain@se m] LOADER(8)               FreeBSD System Manager's Manual              LOADER=
+ 58138 [neil@qu ll p] Mark
| 58146 [probertm@no ] Me, too.  Thanks for the post.
+ 58264 [neil@qu ll p] Thanks working fine now, look forward to 0.2,
  58396 [probertm@no ] -laugh-

on error resume next
57833 [xrfang@ho ma] In the following code, how can I implement the VB "On Error Resume Next"
+ 57841 [gfb@to es ft] begin
| 57848 [xrfang@ho ma] Not what I want :(  I want "On Error Resume Next"... If that is
| + 57854 [dave@pr gp o] Why would you want that? If you gave us some real-life code, perhaps we
| + 57865 [ahoward@fs .] #!/usr/local/bin/ruby
|   + 57873 [gsinclair@so] NOOOOOO!!!!   My head hurts!!!!!
|   | 57882 [ahoward@fs .] lol.
|   | 57899 [xrfang@ho ma] I need the logic, not to squeeze into vb... pls see my sample code, I
|   + 57898 [xrfang@ho ma] I'm sorry I don't understand why $on_error...? Is it mean Global var?
|     + 57901 [ahoward@fs .] yup.
|     | 57902 [xrfang@ho ma] The benefit of resume next is that it will catch all errors. Here, I
|     | 57905 [austin@ha os] Move your rescue.
|     | 57906 [david.naseby] This thread seems so wrong on so many levels. Wishing for VB-like 'error
|     | 57930 [xrfang@ho ma] I can't express how I feel :( The code below is just ONE of its usage,
|     | + 57964 [austin@ha os] People have managed to implement extremely robust recovery logic
|     | | 57965 [xrfang@ho ma] No, This routine does NOT have the same effect as in VB. Anyway, I'm a
|     | | 57966 [gsinclair@so] Don't worry, you'll very rarely see any holy wars on this list.  And people
|     | | 57967 [xrfang@ho ma] Come on, I have give sample code of what I want to do. I just want to do it
|     | + 57969 [peter@se an ] Part of the problem here is that what happens if the magic line of code
|     + 57929 [bystr@ma .c ] RTFM ;-)
+ 57950 [nobu.nokada@] I'm not sure why you want a such vice, but what about this?
  + 57954 [tietew-ml-ru] [Re: on error resume next]
  | 57958 [walker@de fc] You are trying to force ruby to become what you know, instead of learning
  | 57959 [gsinclair@so] Couldn't agree more.
  | 57987 [jim@fr ez .o] If I remember from my VB days, the Resume Next resumes at the
  | + 57993 [nobu.nokada@] set_trace_func could be used, but I'm not sure about it nor
  | | 58039 [treo@ha os a] vs.
  | | + 58068 [dblack@ca dl] Sorry, I just have to chuckle over the idea that either of these is
  | | + 58075 [gsinclair@so] is less obfuscated and clearer on intent.
  | + 58129 [mikkelfj-ant] Would it help to think of it as ResumeNextStatement instead of
  |   58141 [austin@ha os] No, because it's still nondeterministic in behaviour. (It's
  + 57955 [gsinclair@so] That's so ugly it could be a modern art masterpiece!  Please, can we have some

Hash 'issues'
57839 [jason@pe sa ] OK, I'm messing around with hashes for the first time,
+ 57846 [dblack@ca dl] << and push do change the array.  If they don't seem to, then
+ 57847 [gfb@to es ft] Array#push and Array#<< DO change the receiver.
| 57851 [jason@pe sa ] I really love you guys...
+ 57870 [nobu.nokada@] `foo[key]<<=value' works as `foo[key]=foo[key]<<value'.

CGI.escape - doesn't
57844 [ahoward@fs .] rubyists-
+ 57935 [drbrain@se m] '+' is an allowed replacement for spaces.  Read both cgi.rb and
| 57940 [bruce@co ed ] -snip-
| 57973 [austin@ha os] RFC1866 is for HTML 2.0; it has been obsoleted in 2000 by RFC2854,
| + 58011 [ahoward@fs .] as far as i can tell, the appropriate rfc regarding uri syntax is actually
| + 58013 [bruce@co ed ] To be pedantic, HTML 4.01 Specification (W3C Recommendation 24 December 1999),
|   58026 [ahoward@fs .] but 2396 obsoletes 1738 and 1808
|   58030 [bruce@co ed ] That's fine.  I didn't say it wasn't historical; I mentioned the pedantic
|   58036 [ahoward@fs .] for those intersted, the URI package written by akira yamada available on the
+ 57963 [m_libby@an s] Judging by other responses, this is really a problem with your HTTP server.

Buffered output on Windows
57856 [nemo@he lo r] Why do I have to put
+ 57859 [mwilson13@co] Why would you want to run your programs on Windows?
| + 57862 [nemo@he lo r] Why would you want to run your programs on Windows?
| + 57885 [austin@ha os] Because 90% of the world runs Windows, and not all of us are Linux
|   57886 [ted@da ac mm] That's better than 95+% ... which is what it used to be.
|   57889 [spoon@de la ] Of course, these are random stats. Not much use unless one
+ 57864 [ oct@zo .o g] Chris,
| + 57878 [harryo@zi .c] That doesn't make any difference.  If he was using print, that would make
| + 57880 [nemo@he lo r] Chris,
+ 57913 [nobu.nokada@] How did you run the program?  It worked in "DOS Prompt".
  58065 [nemo@he lo r] How did you run the program?  It worked in "DOS Prompt".
  + 58066 [dave@pr gp o] Windows comes with its own (broken) version of rsh. CVS uses that to
  + 58074 [nobu.nokada@] It means rxvt cygwin port is incomplete yet.  It uses a pipe to

FXRuby question
57857 [rich@in oe h] Does anyone know how to capture the event generated when one clicks on
57866 [lyle@us rs s] When you click the kill button on the main window, it (the FXMainWindow
57911 [rich@in oe h] That solved my problem perfectly.  The FreeRIDE project thanks you ;-)

Apache 2 and mod_ruby and ruby 1.7.3 .... almost got it!
57867 [nemo@he lo r] OK.  It's all working, except that mod_ruby starts with it's $LOAD_PATH
57871 [ted@da ac mm] Please don't!  There are others of us who are less technically inclined who watch this closely...

What's important to know about Ruby?
57875 [ ted@ph .n t] I believe Ruby to be a "small" language -- like C.  There is relatively
+ 57887 [gsinclair@so] Although I'm not answering your question directly, have you read the "Things
+ 57944 [nat.pryce@b1] Yes, and even more so than C. In C, primitive types are manipulated by

Regexp imxo - does 'x' work?
57883 [ahoward@fs .] should this not work ?
+ 57890 [dblack@ca dl] That's working, isn't it?
| 57903 [ahoward@fs .] i guess.  it looked like the comments were being included in the regex... i
| + 57908 [dblack@ca dl] Oh, I see what you mean -- but yes, they are included.  Hmmm... I was
| | 57914 [nobu.nokada@] In 1.7, this is more efficient.
| | 57922 [sdate@kc rr ] ...
| | 57924 [nobu.nokada@] "#{"Hello";""}" is equivalent to ("Hello";"").to_s or
| | 57926 [sdate@kc rr ] Great !
| + 57918 [spoon@de la ] puts "Foo" =~ /Fo(?# this is a comment )o/
+ 57893 [spoon@de la ] Perl is returning whether there was a match (undef if no match).
  57894 [ted@da ac mm] .. and it returns 'nil' for no match?
  + 57895 [spoon@de la ] Correct. The ruby equivalent of undef =)
  + 57896 [gsinclair@so] Try 'irb' and/or 'ri'.
    57897 [ted@da ac mm] Thanks.  Hey!  I'm getting it.  Thanks to the patience of the group.

ruby/GTK widgets examples?
57917 [NOSPAM@no la] I am just starting out with Ruby/GTK and am trying to use a certain

[OffTopic] Changing output pane color in SciTE
57923 [pcestrada@ho] I'm using SciTE as my Ruby editor and I would like to change the foreground

LCC-Win32 version of Ruby
57925 [phasis@ko ne] I am trying to compile ruby 1.7.3 using LCC-Win32 on windonws XP.
57989 [ekarttun@cs ] I have worked with lcc-win32 sometimes. The lack of documentation

Printing subclasses
57927 [ ted@ph .n t] Can Ruby print the subclasses of a given class?  Like the reverse of the
+ 57932 [kentda@st d.] a = StandardError # just as an example
+ 57934 [gsinclair@so] def subclasses(the_class)
+ 57938 [bruce@co ed ] Ted,
  57942 [gsinclair@so] The ObjectSpace solution should only require that the class has been defined.
  57948 [bruce@co ed ] Ok, an honest mistake-- and to clarify on 'instantiation'; I meant instances
  57956 [gsinclair@so] Hmmm.... OK, half marks for applied knowledge :)

ML archive
57928 [sdate@kc rr ] Is there any place where this ML is archived so that we can download archive
+ 57933 [gsinclair@so] www.ruby-talk.org for *online* browsing.
| 57994 [sdate@kc rr ] Meaning ?
| 57996 [emmanuel.tou] wget is a UNIX download program (supports recursive downloads etc).
+ 57937 [matz@ru y- a] matz.
  57995 [sdate@kc rr ] Thanks, Matz !