188426-189406 subjects 188853-196319

^ dl/win32 EnumWindows loops correctly then segfaults
188636 [ruby_talk sh] Googling for "ruby win32api EnumWindows" led me to this four-year-old

^ Can not install mysql for ruby
188652 [ peter rt.sk] I hope this is not too off-topic, but after 2 days of googling and
188655 [ peter rt.sk] OK, got it. I did not have make installed.Somehow this was not clear for
188670 [masukomi gma] *ponders how anyone could distribute a linux system without make
+ 188673 [ peter rt.sk] well, that's why i was not able to find the solution quickly: it is so
+ 188701 [david vallne] charset="utf-8"
  188725 [ peter rt.sk] Well, the dapper libmysql-ruby was not enough for the bleeding edge

^ authoritative only DNS in ruby
188653 [DXpublica te] I want to know if you can help me in writing a ruby authoritative only
+ 188689 [DXpublica te] An alternative is if you point me some library that serve for receiving
| 188720 [sroberts uni] Look at the source for resolv.rb in the ruby stdlib. It has DNS message
| 189019 [DXpublica te] First of all, thank you very much for your answer and for point me these
+ 189065 [stoyan gmail] TinyDNS [ http://cr.yp.to/djbdns.html ] is not difficult to install.

^ Simple substitutions
188656 [pbailey bna.] Some of you all helped this newbie a couple of weeks ago. I'm getting
+ 188657 [rossrt rosco] ruby is just complaining about a Perl-style s/// regexp. :) The correct
| 188661 [pbailey bna.] Thank you, Ross.
| 188665 [rossrt rosco] Well, memory is cheap these days and I have to admit I'm much less
| 188667 [pbailey bna.] Aha. I didn't know about "scan." Just the word alone makes sense for
| 188680 [rossrt rosco] if File.read('test1.ps') =~ /\%\%Pages: ([0-9]{1,5})/
| 188687 [pbailey bna.] Yes, the =~ notation certainly seems simpler. Now, I'm pursing this
| 188699 [rossrt rosco] blanks = []
| 188713 [pbailey bna.] This works great now! I'll try to remember the #{} syntax. I guess I'm
+ 188658 [ peter rt.sk] line.sub!(/%%Pages: (\d{1,5})/){"Pages: " + $1}
| 188664 [pbailey bna.] Yes, that worked for me. Thank you, Peter. Like Ross' response above, I
+ 188749 [sroberts uni] Other people commented on the regex
  188779 [pbailey bna.] Thanks, Sam. So, is doing your "if(line . . ." suggestion quicker, do

^ Substituting from another file
188666 [thomasmh gma] I have a textfile with a long text, and a wordlist with words both in
188668 [Nuralanur ao] I had resolved a similar problem some time ago by reading what  corresponds

^ Installing on Solaris using sparc-sun-solaris-2.8
188669 [fleur_corfie] I am a newbie to Solaris and Ruby.
+ 188712 [Daniel.Berge] Strange.  What version of gcc are you using?
+ 188723 [Daniel.Berge] Wait a minute - are you building against the latest in CVS?  Because I'm
  188741 [Daniel.Berge] FYI, Matz, or whoever from core is listening, it appears that you need to link
  188744 [Daniel.Berge] Further research indicates that sunmath.h is part of the Sun compiler install,
  188772 [fleur_corfie] Sorry - you have lost me!
  188774 [fleur_corfie] DONE!!!

^ Ruby 1.8.4 - irb -> require "irb/completion" fails
188671 [frederic.cha] I am running ruby 1.8.4 under Solaris10/Sparc using the archive from
188702 [david vallne] charset="utf-8"
188896 [frederic.cha] SGksCgpJIGdvdCB0aGUgInJlYWRsaW5lIiBwYWNrYWdlIGZyb20gc3VuZnJlZXdhcmUgaW5zdGFs

^ rubyscript2exe and gem
188677 [guslist free] Is there a way to tag files in a gem according to their "function",

^ First script seems slow - What's a better way to write this?
188678 [c.f.curtis g] I've inherited a tcl script from previous co-op students, and it's a
188688 [peter semant] As a side issue there is a tool to generate cross references in tcl

^ Using gems problem -- LoadError
188681 [vladislav.tc] I am a newbie with ruby and gems and I have this frustrating problem not being
188684 [halostatue g] Try "require 'xml/simple'". One has to require the libraries that arerepresented in the gem, not the gem itself.
188704 [vladislav.tc] Thank you Austin .. that was it.. I was using wrong libraries names

^ module inheritance
188683 [charlie cast] I'm trying to modify a module but I can't seem to access it's private

^ unsupported file format (SQLite3)
188693 [iannai ntlwo] I'm running sqlite3-ruby 1.1.0 and sqlite 3.3.4 on 2 linux machines. I

^ Re: First script seems slow - What's a better way to write t
188696 [c.f.curtis g] Thanks for the link.  However, I forgot to mention that the reason I'm
+ 188703 [desmarm gmai] I'm afraid that I can't take the time right now to really pore over the
+ 188705 [ara.t.howard] require 'yaml'
| 188707 [Daniel.Berge] Just a quick note - precompiling the regular expressions might help here, too.
| + 188708 [ara.t.howard] 3533
| + 188714 [r.mark.volkm] How do you do that in Ruby?
|   + 188716 [logancapaldo] charset=US-ASCII;
|   | 188721 [binary42 gma] @re = /^\w+-\w+$/ # Some random expression
|   | 188726 [c.f.curtis g] Just for fun, I tried it too... I get
|   | + 188731 [rossrt rosco] user     system      total        real
|   | | + 188819 [matz ruby-la] Because qux creates a lot of Regexp objects.  Since Oniguruma (1.9
|   | | + 188838 [c.f.curtis g] Could the operating system have an effect on the speed?
|   | |   188860 [SimonKroeger] Without opening or closing a single program/window i benchmarkt
|   | |   188861 [ara.t.howard] but why?  it's windows!?
|   | + 188738 [ara.t.howard] in fact my approach is slowed by those features.  what makes it a bit faster
|   + 188719 [ara.t.howard] /re/o
+ 188706 [david vallne] charset="utf-8"

^ Shame on me poorr newbie " unexpected kend"
188709 [alexandremic] I am trying to learn ruby through a udev utility coding.
+ 188710 [james graypr] store += 1
| 188729 [lists bertra] Further you probably want to increment `store' at the end of
+ 188711 [r.mark.volkm] Ruby doesn't support ++.  I don't know if that's the only problem though.
+ 188751 [dblack wobbl] See the other answers for the ++ and possibly other things -- but note
  188776 [alexandremic] First thank you all for your fast answers.
  188804 [dharple gene] Don't use numbers as a substitute for booleans. Also, why are you
  + 188814 [simon.kroege] def ask(msg)
  | 188820 [gdprasad gma] $ ruby find_usbdev.rb
  + 188836 [alexandremic] method yet very dirty one".

^ gateway?
188715 [transfire gm] Anything I can do to fix the gateway?

^ Re: vim 7 ruby omni-complete v0.2
188717 [vagabond cat] Well, once I stripped all the carraige returns from the .vim file, it
+ 188736 [vagabond cat] I put mine in ~/.vim/autoload and it seems to load OK.
| 188746 [ara.t.howard] i get an error about no 'omnifunc' attribute.  which vim are you running?
| + 188747 [r.mark.volkm] It's working for me now.  Here's what I did to get it to work under Windows.
| | 189399 [d454d web.de] with the recent versions of rubycomplete.vim the last line has to be
| + 188750 [alexandru gl] Though it's still beta, alfa has been stable for a long time already :)
|   188754 [ara.t.howard] time to upgrade then... ;-)
+ 190142 [mark scottis] I'm getting exactly the same results.
  190263 [segfault has] Are you using 0.2, 0.4 or the current cvs head?
  190276 [vagabond cat] You should do proper releases then, not just uploading over the old
  190305 [segfault has] Same site

^ Difference between classes' methods and its "own" methods?
188724 [transfire gm] Little confused, why don't the product the same thing?
188742 [zdennis mkte] I may be wrong, but I think....it has to do with the 'virtual class instance X of Class'. ie: (class << X; self; end)
188765 [srinivas.j s] irb(main):001:0> (class << Class; self; end).object_id

^ File basenames using File.basename . . .
188727 [pbailey bna.] I need to truncate the extension of some of my files, so that I can add
+ 188728 [Daniel.Berge] Remove the quotes around txtfile.
| 188732 [pbailey bna.] irb(main):008:0> txtfiles.each { |txtfile| File.basename(txtfile,
| 188733 [Daniel.Berge] Oh, you're just seeing what irb returns at the end of Array#each.
| 188780 [pbailey bna.] Thanks, Dan. Both of your suggestions worked for me. Now, how could I
| 188810 [Daniel.Berge] To rename individual files, use File.rename.  For batches of files I'm
| 188833 [pbailey bna.] Makes sense. Thanks.
+ 188745 [jay.johnston] Posted via http://www.ruby-forum.com/.

^ Segmentation fault in recursive function
188730 [sven c3d2.de] when executing the attached code I get a segmentation fault.
+ 188768 [daniels pron] It's most likely because something isn't compiled right. It's just as
+ 188771 [nobu ruby-la] Stack overflow can't be caught always.  There's no way (portable one,

^ FYI Attribute names with spaces in 1.8.4
188734 [reevesg pobo] It seems that attribute names cannot contain spaces since 1.8.4.

^ SDL in ruby?
188735 [kontakt dael] What use for SDL support in ruby? I dont need extra performance for SDL,
188752 [billk cts.co] Here's a recent post from Florian G. about a game written in Ruby / Gosu,

^ Ruby 1.8.4 RDoc Seg fault
188755 [transfire gm] [BUG] Segmentation fault
188762 [ryand-ruby z] Wow... that is really unhelpful. Do you at least have a repro?
190292 [marick visib] Here's one, but from a different lineno than the original poster (and
190309 [marick visib] For what it's worth, I've had trouble all day when rubygems runs rdoc
190357 [ryand-ruby z] This is a bug in ruby where VALUEs collide exacerbated by GCC4 on

^ map_if, collect_if ???
188756 [bruce.woodwa] I have been through the pickaxe book, looking at the array and enumerable
+ 188757 [mvette13 gma] Try using the 'select' method...
| 188758 [logancapaldo] charset=US-ASCII;
+ 188764 [ara.t.howard] a = 1 .. 5
| + 188781 [bruce.woodwa] Ara,
| + 188909 [d454d web.de] I don't get it: why is i[0] == 1 returning true in case i is an integer
|   188910 [logancapaldo] charset=US-ASCII;
|   188977 [d454d web.de] Ah, I see. Thanks for your help!
+ 188778 [robert.dober] module Enumerable
  188783 [bruce.woodwa] Robert and Logan,
  188787 [simon.kroege] map(&block).select{|e|e}
  188792 [robert.dober] Good point.
  188802 [robert.dober] module Enumerable
  188806 [ mfp acm.org] It's quite slow (two blocks in use...).
  188830 [robert.dober] x} }

^ shell.rb and class << Shell
188759 [john.carter ] I'm confuzzled.
188760 [halostatue g] class Shell    class << self    end  end

^ TCPsocket send, puts and write
188761 [rtilley vt.e] t = TCPsocket.new(host, port)
188775 [nohmad gmail] $ irbirb(main):001:0> require 'socket'=> trueirb(main):002:0> ts = TCPSocket.new('0', 80)=> #<TCPSocket:0xb7cb2ddc>irb(main):003:0> m1 = ts.method(:send)=> #<Method: TCPSocket(BasicSocket)#send>irb(main):004:0> m2 = ts.method(:write)=> #<Method: TCPSocket(IO)#write>irb(main):005:0> m3 = ts.method(:puts)=> #<Method: TCPSocket(IO)#puts>
+ 188782 [rtilley vt.e] Yes, thank you for the example. I have been using write, but I did not
| 188807 [nohmad gmail] Ruby's standard socket library is very similar to BSD socket interface:send(2) and write(2).
+ 188843 [billk cts.co] I think #write will block until all the data is sent, whereas #send

^ new ruby forum site
188766 [jtoy rubynow] I was wondering if anyone could make any suggestions for the site and
188767 [jtoy rubynow] Also I am at the Canada on Rails conference, so I will be posting

^ IO stream help
188769 [lon speedyma] I am struggling with handling stdin and stdout in Ruby.
188770 [farrel.lifso] Something like this?
188822 [lon speedyma] Thank. But no luck.
188825 [logancapaldo] charset=US-ASCII;
188826 [lon speedyma] Yes it needs to be asynchronous.
188829 [ara.t.howard] you need something like
188840 [lon speedyma] Thanks for all the help.
188845 [ara.t.howard] but this is blocking?  we thought you were needing asynchronous code?  what
188851 [lon speedyma] Thank you! I did not realize that is what I had done.

^ HTTP Client
188777 [miggyx petes] One of the projects I'm working on that I'm currently porting from Java
188823 [logancapaldo] ...

^ Question mark in attr_*
188784 [halfgaar gmx] Methods which return booleans end with a question mark, by convention. But how
188834 [phurley gmai] As ruby does not have data types, the onus is on the developer to
+ 188837 [collinsj sea] This could be pretty handy...but I don't understand why you have the
| + 188839 [Daniel.Berge] FYI, I brought this issue up at
| + 188841 [rforum gmail] Maybe so the first ! coerces to a true or false, and the second flips it
| | 188842 [phurley gmai] Exactly -- you could remove it all together, but this way the method
| | 188844 [collinsj sea] Okay, makes sense.
| + 188847 [ara.t.howard] if you like having this check out traits - it does this automatically
+ 188846 [ara.t.howard] or just use
| 188848 [phurley gmai] That does not work for me, is there a trick?
| 188854 [ara.t.howard] wow.  you are right.  it fails silently on 1.8.1 and throws an error on 1.8.4.
| 188855 [Daniel.Berge] Unfortunately, it looks like they decided to error out rather than take a DWIM
+ 188867 [halfgaar gmx] I will give this a go tomorrow (it's bedtime now...). Should work pretty well.

^ [SUMMARY] Markov Chains (#74)
188786 [james graypr] I owe myself a signed copy of my book.  Err, I mean, this was a popular quiz!

^ Ruby Hacking Lunch
188789 [pat.eyler gm] Today, 13 April, from 1200-1300 (MST), at the Salt Lake City Library.

^ Range#size
188790 [meinrad.rech] dear list,
+ 188794 [james graypr] => nil
+ 188797 [jtregunna bl] charset=US-ASCII;
| 188817 [jonrubyforum] You know, it's not as though all range operations work with all range
| 188821 [ara.t.howard] nothing.  but try to write it.  it's harder than you might think.
+ 188799 [ara.t.howard] this has been discussed before.  the main issue is that ranges are not
| 188800 [simon.kroege] Well, that's slow but could...
| 188808 [Daniel.Berge] What's the size of 1.2..3.4?
| 188811 [ara.t.howard] 5 ?
| 188813 [Daniel.Berge] Crap! Time to change my luggage combination!
+ 188824 [meinrad.rech] a range like "a".."z" would crash with #size !!
+ 188923 [florgro gmai] Use .to_a.size instead. :)

^ [ANN] Ruby Idioms (TextMate Bundle)
188791 [james graypr] Just a short note here, for TextMate users.  I've made my bundle of
188868 [ezmobius gma] James-
+ 188869 [eric.wenbl g] I'm wondering that where the similar thing in Emacs is ?
+ 188919 [james graypr] You bet.  I hope you find it as helpful as I do.
  190259 [james graypr] An improved version of the bundle is now in the official bundle
  + 190261 [Jamal.Mazrui] Would you consider also making the bundle available as a plain text file
  | 190264 [james graypr] I cannot think of a reasonably way to do this.  It depends on the
  | 190267 [Jamal.Mazrui] Let me clarify that I understand a plain text file would not generate
  | 190270 [james graypr] Most of the files in the bundle are XML files.  If you open them in a
  + 190275 [smithav cshl] Very cool.
    190277 [james graypr] You can open the bundle editor and sort them by hand.  By default, I
    190278 [smithav cshl] Somehow this wasn't obvious to simpleton me when I first looked at
    190279 [james graypr] TextMate doesn't currently support this, but I've forwarded your

^ Downloading Array of PDF Files Extracting MetaData
188798 [dandiebolt y] Let me simplify the description of a task I have to perform.

^ [ANN] Random 0.2.1
188801 [robert.feldt] A first public release of Random is now available. See README below
188803 [robert.feldt] require 'rubygems'

^ Array#-
188805 [jogloran gma] I need items to be compared based on their values, and not by object
+ 188809 [florgro gmai] Nope, you just need to redefine hash and alias == as eql?.
+ 188812 [ mfp acm.org] RUBY_VERSION                                       # => "1.8.4"
  188872 [jogloran gma] Ah, thank you. But could this change in future versions? The fact that the
  188892 [shortcutter ] Why don't you just use a Set for storage of the values if that's what it is?

^ Linux/Ruby Internship in Houston
188827 [blargity gma] Linux Journal (http://www.linuxjournal.com) is hiring in the Houston area for

^ blog posts about Ruby internals
188849 [pat.eyler gm] Sean and I have been digging around with ParseTree and friends for
188850 [mtrier gmail] Very cool, and thanks for the pointer.  I'm bummed I missed the

^ Rubyesque way to do multiple <=>
188852 [vshepelev im] I have class with some fields
+ 188857 [robert.dober] about the second.
| 188858 [vshepelev im] You haven't got it. I already USED first version, but I CAN'T if comparison
| + 188859 [robert.dober] I have not, you are right! really sorry, I just *could* not immagine that
| | 188886 [vshepelev im] I thinks, there is a bit of irony :)
| | 188897 [robert.dober] Not at all, I do not like UPPERCASE but I did not notice, I was too
| + 188862 [phurley gmai] Can you provide a <=> for the special cases? Otherwise I guess
+ 188878 [flori nixe.p] def <=> (other)
  188887 [vshepelev im] Seems that return value would be wrong (true/false instead of -1|0|1)
  + 188889 [rossrt rosco] def <=>(other)
  + 188893 [SimonKroeger] from http://www.ruby-doc.org/core/classes/Numeric.html#M001317