266279-268477 subjects 266743-374209

non-blocking socket in Ruby 1.8.4?
266503 [yermej@gm il] I'm using Ruby 1.8.4 on Linux and I'm having trouble with non-blocking
+ 266539 [garbagecat10] ...
+ 266558 [yermej@gm il] OK, please disregard my previous message. I have something else wrong

[ANN] Ruby-VPI 19.0.0
266507 [ snk@gn .o g] Ruby-VPI is a Ruby interface to IEEE 1364-2005 Verilog VPI
266548 [SSullivan@co] unsubscribe

Handling Strange Superclass Mismatch
266508 [beingthexemp] I'm having a weird issue with Superclass Mismatches. I'm using
266512 [beingthexemp] I figured it out. was doing something retarded. thanks.

check if server is alive in drb
266519 [tiberiu.moto] Is there any elegant method for checking if a drb server is still
+ 268407 [drbrain@se m] Nope.
+ 268426 [ara.t.howard] depending on how many clients there are each one can call a method on
  268461 [mailing.mr@g] hmm that's good idea for keeping connections alive i guess :) i had

Sending URL
266520 [aby_azid@ya ] I need to send a URL to a server, example
266653 [shaiguitar@g] class Net::HTTP

''Macro'' operator
266524 [d_rems@ya oo] a1=10
+ 266527 [alexg@ku cr ] irb(main):001:0> a1 = 10
+ 266528 [botp@de mo t] # a1=10
| 266534 [d_rems@ya oo] Thanks eval is good. What I have is database with fields
| + 266536 [matthias@wa ] Maybe you should change your database scheme to return an array
| + 266569 [shortcutter@] I am not sure whether this is intentional but your variable "name" does
| + 266627 [botp@de mo t] On Behalf Of Damjan Rems
+ 266537 [robert.dober] sure ? equals "10 || "

transfer (own)ruby object over SOAP
266531 [philipp.goet] after 2 days searching the web for a solution i get stuck.
266546 [nakahiro@sa ] If there's no need for interoperability, you should use Marshal.
266592 [philipp.goet] thanks, for you answer.

[ANN] Webistrano - A Web UI for managing Capistrano deployments
266533 [jw@in er wu ] I'm happy to announce the release of Webistrano - a Web UI for managing

only one form_helper per rhtml in rails?
266538 [red@re 66 .o] i'm writing an short rails-app for some friends of mine and now i came
+ 266540 [red@re 66 .o] found the problem - new syntax for the form_tag - now with "do"
+ 266541 [dangerwillro] Both of your forms can work, each form can call to a different method

https with ruby
266545 [d_rems@ya oo] This task has come to my desk last hour and I wonder if it could be done
266547 [jan.svitok@g] There's a package for https, on top of Net::HTTP, look for Net::HTTPS,

can this be more succinct?
266549 [eggie5@gm il] How can this be more succinct? Can I somehow put the nil check inline
+ 266550 [dan@fl en ra] (params[:categories]||[]).each do |id|
+ 266551 [lists@be tr ] pc = params[:categories]
| 266570 [shortcutter@] +1
+ 266552 [fwmailinglis] charset="us-ascii"
+ 266553 [lopx@ga et .] params[:categories].to_a.each do ...
+ 266564 [florian.assm] Just a minor thingy, rename timestamp_start column to created_at and

problem with yaml
266556 [yvon.thorava] i'm using a yaml file to save my preferences in a RubyCocoa
266557 [jan.svitok@g] Just a blind guess: yaml doesn't know how to (de)serialize binary data
+ 266801 [yvon.thorava] OK, thanks i'll avoid that Data {}
+ 266809 [yvon.thorava] in fact, i'm using severall Folders BUT it is only the outermost

Re: Ruby-VPI 19.0.0
266559 [ snk@gn .o g] I don't understand.  Are you saying that (1) I should stop posting
266860 [vjoel@pa h. ] He must have unsubscribed. Please keep posting!

Problem with mod_ruby and mod_auth_mysql
266560 [lokean.darke] I have a following problem.

special super call for module class-level inclusion
266565 [transfire@gm] Since I've come upon the issue again, I reckon, it's as good time as
266767 [dan-ml@da 42] IMHO the reason for this problem is that modules serve double duty as
266963 [transfire@gm] Nice work! That's not the easiest piece of meta-code to write. But has

existing postgres database
266566 [gianmh@gm il] Quick simple question
266595 [damnbigman@g] ...
266597 [fwmailinglis] charset="us-ascii"

openssl buffer.rb EOFError
266598 [joe@jo ti y.] Exception `EOFError' at /usr/lib/ruby/1.8/openssl/buffering.rb:35 - end

gsub help
266607 [hsolter@gm i] this is more of a regexp question but I'de be happy if you help me
+ 266614 [dzwell@gm il] Hurcan,
+ 266624 [logancapaldo] This is not a job for regexps. This is a job for a ruby parser.
| 266665 [thibaut.barr] Maybe parsing with http://www.zenspider.com/ZSS/Products/ParseTree/
+ 266629 [w_a_x_man@ya] If " and / are the only wrappers you have to worry
+ 266639 [botp@de mo t] #   line.gsub!(/\s*([=]+)\s*/ ,' \1 ')
  266717 [w_a_x_man@ya] str='/x==9/ {print "so x=9 and AWK is everywhere!"; x=9 }'

Deleting empty directories
266613 [Paul.vanDels] I'm putting together a script to automatically update a repository working copy. The
266622 [dblack@wo bl] You're currently using collect plus compact, but you can actually just
266686 [Paul.vanDels] [snip..asking for a better way]

idiomatic way to assign if not nil?
266616 [  jay@ja .f ] I know I can use "a ||= b" to assign b to a if a is nil.
+ 266618 [logancapaldo] a &&= b will almost get you there
+ 266619 [dougal.s@gm ] a = b || a
| 266621 [logancapaldo] a = b if b
| + 266623 [dblack@wo bl] a = b if b
| | 266631 [  jay@ja .f ] Yeah, it was more that I was doing a bunch of them at once to deal
| | + 266633 [logancapaldo] Is this not what #attributes= is for?
| | | 266640 [  jay@ja .f ] Nope!  That won't assign any attributes that are attr_protected.
| | | 374552 [steveausten5] I really enjoyed the article. It proved to be Very helpful to me and I
| | + 266634 [vjoel@pa h. ] No need for eval...
| |   266642 [  jay@ja .f ] User.protected_attributes.each do |key|
| + 266683 [kbloom@gm il] But a is defintiely a variable, while b may be a function call.
|   + 266750 [dougal.s@gm ] Took the words right out of my mouth, I must read my email more
|   + 266758 [logancapaldo] Methods that are expensive and/or have side effects should probably
+ 266915 [alfred.anzlo] Recently I had a similar problem. After some refactoring of code
| + 267178 [ news@ja .f ] Neat - you did that with superators?  Or some other way?
| + 267198 [phrogz@ma .c] How did you do that, given that those operators are (as you say) non-
|   267199 [logancapaldo] anything :)
|   267353 [alfred.anzlo] No, I did not modify ruby source (for "it is not the right thing" :).
+ 267209 [erikveen@gm ] "idiomatic way to assign if not nil?".
  267235 [konrad@ty er] charset="iso-8859-1"

Ruport 1.2 Released
266636 [mikem836@gm ] Ruport version 1.2 has been released.  This update contains

Where is the define_singleton_method method?
266637 [eustaquioran] I just got the svn trunk and was testing some new stuff, but could not
266650 [nobu@ru y- a] No such method is defined.
266659 [eustaquioran] Thanks for your answer, but now I'm kind of lost here. There's a
266788 [nobu@ru y- a] It seems lost at YARV merger.  Reverted now.
266839 [eustaquioran] Thank you!

[ANN] Ruby/Informix 0.6.0
266638 [gerardo.sant] Ruby/Informix is a Ruby extension for connecting to IBM Informix

Help parsing simple structured data.
266641 [nubyruby@gm ] ...
266643 [dzwell@gm il] rows = `df -h`.split("\n")[1..-1]
266644 [nubyruby@gm ] ...
266646 [dzwell@gm il] Craig,
266647 [nubyruby@gm ] ...
266652 [botp@de mo t] # of processing is the bit of code I use most in my daily life, and the
+ 266666 [thibaut.barr] +1 for ruport, it makes these things very easy to achieve, with less
| 266679 [gregory.t.br] table.to_pdf(:file => "report.pdf)
+ 266796 [nubyruby@gm ] ...

How to fix this error, help please!
266648 [zlai@si a. o] I want to run this simple test, but something is wrong. I don't know how
266660 [a99.googlegr] says, that "The ruby Unit/test" is expected to be a filename or a
266703 [zlai@si a. o] Thank you for your answer. I see this. but "The ruby Unit/test" is just
266704 [alex@bl ck e] The point is that ActiveRecord thinks that data should be a filename,
266707 [zlai@si a. o] Thank you. I think that reason is caused by fixture. where can I get
266712 [alex@bl ck e] Alex

Re: Accessing ruby 1.9 interpreter from other threads
266649 [nobu@ru y- a] And to bind calling native thread a ruby thread.  But still not
266657 [charles.nutt] A similar mechanism is used in JRuby to "adopt" incoming Java threads as
267700 [nobu@ru y- a] Does that "adopt" occur in any call to ruby?  Isn't it
267787 [charles.nutt] Not really, if the thread hasn't been adopted it just constructs a new

Buglet in 'gem check --alien'
266655 [han.holl@gm ] Running 'gem check --alien' will fail if there is a gem installed with
268358 [drbrain@se m] File a bug in the tracker.  Bug reports filed by email will be ignored.
268453 [ news@ja .f ] Jay
268456 [drbrain@se m] Those punctuation symbols are too hard to reach.
268506 [ news@ja .f ] No superators for you then!
268568 [drbrain@se m] Nope.

Duck Typing in other languages?
266656 [shevegen@li ] Heya,
+ 266681 [eric.mahurin] Another place I've noticed similar functionality is with
+ 267888 [rosenau@cr w] Duck typing is not formally defined. If it means similar

SQLIte3 DL driver deprecated, how to use native?
266661 [catflaporama] ...
266684 [jeremy@hi eg] It would appear that rubygems cannot find your ruby.h for your ruby
266695 [catflaporama] ...
267364 [catflaporama] ...

Difference between Distributed ruby and Rinda
266664 [hema_aspire@] Can anyone tell me the difference between Distributed ruby and rinda?
266807 [brenton.lean] Rinda uses Distributed Ruby (DRb) in its Tuplespace implementation.
266808 [garbagecat10] ...
266813 [znmeb@ce ma ] Thank you from the bottom of my heart for this!! Just out of curiosity,
266814 [garbagecat10] ...
+ 266893 [znmeb@ce ma ] Well ... you need something that's OS-agnostic and network agnostic,
| 266900 [garbagecat10] ...
| 266916 [znmeb@ce ma ] And just look at some of the options the Linux kernel (2.6.22) provides
+ 273013 [eleanor@ga e] You might like to take a look at DNS NAPTR records. They're not

Detect file encoding utf-8
266667 [Gilbert.Rebh] I want to check the file encoding of files in a directory.
+ 266676 [richard.conr] You could use some regular expressions, to search for code points in
+ 266691 [fxn@ha hr f.] Have you tried charguess?
  266730 [mailforgilbe] No, how to install it ?

Address Book Import
266669 [pradeep.ramk] Is there any way to import address book of rediffmail and indiatimes
266687 [kenneth.kalm] Well, the contacts gem seems to do a good job of Gmail, Y! and

Looking for help implementing static variables
266670 [htruax@st .c] ...
+ 266677 [ronald.fisch] Don't know whether this is the best solution, but I usually
+ 266742 [vjoel@pa h. ] This isn't built into ruby, which is probably a good thing because there

Getting all google results with hpricot and connecting two gsub statements to just one?
266671 [kazaam@ol co] #!/usr/bin/env ruby
+ 266694 [ruby@an hr p] Look into mechanize or scrubyt for this. They sit on top of hpricot, but
| + 266735 [bigboss64@ip] I always thought the Google Terms of Service (around 5.3) suggested that you
| + 266817 [mneumann@nt ] ge
|   266847 [bigboss64@ip] From the Google Terms of Service which as far as I know cover all Google
+ 266749 [dougal.s@gm ] why covered this a while ago in one of his blog posts: http://
  266756 [dan-ml@da 42] I would not suggest doing that as google doesn't allow bot requests and

rake + FileUtils == warining
266672 [ronald.fisch] When I require both rake and FileUtils, i.e.
266674 [alex@bl ck e] Are you sure you don't want to require 'fileutils' rather than
266678 [ronald.fisch] Indeed, I needed to write it as 'fileutils' and the error disappears.
+ 266734 [bigboss64@ip] The file to be required is <install prefix>/lib/ruby/1.8/fileutils.rb which
+ 266751 [alex@bl ck e] I think what's happening here is a conflict between Ruby's require
  266921 [ronald.fisch] You are right! I'm pretty sure that was it!

Find out the NameServers of a Domain name
266673 [vinay.beckha] I was wondering if there is any way to find out all the Nameservers a
266723 [bulliver@ba ] require 'resolv'
266739 [vinay.beckha] Perfect... thnx mate

Calling VB6 dll from Ruby
266675 [lrlebron@gm ] I am trying to use a VB6 dll created by another programmer from Ruby.
266680 [mikewoodhous] I haven't tried this from Ruby, but VB6 DLLs are actually "ActiveX" or
266685 [lrlebron@gm ] I tried registering the dll and using win32ole but didn't have any

266682 [mark.ransom@] I'm a novice programmer who is just starting out in Ruby. I've been
+ 266688 [stefano.croc] Your array ends up having 6 elements, the first of which is nil. This happens
| 266697 [mark.ransom@] Stefano,
| 266699 [mark.ransom@] Thanks again, its invaluable to see the same actions performed using
| 266760 [logancapaldo] FYI, you can copy and paste from cmd.exe, you don't need to take
| 266764 [fwmailinglis] charset="US-ASCII"
+ 266689 [sdball@gm il] The problem is that you start your array index at 1, not 0.
+ 266690 [ymendel@po o] numplays = 5
+ 266692 [jeremy@hi eg] puts nums.join(',')
+ 266698 [sepp2k@go gl] nums=(1..55).sort_by {rand}.first(5)

ComboBox into a Grid
266693 [aart85@gm il] ...
266706 [lloyd@2l ve ] I am guessing that you might get a better response if you said where you
266709 [aart85@gm il] ...

Bug in URI.parse?
266700 [beers@ta le ] ...
+ 266714 [dangerwillro] Good question!  I've yet to figure out a good way to handle the
+ 266715 [djberg96@gm ] irb(main):001:0> require 'uri'
  266725 [fwmailinglis] charset="us-ascii"
  + 266729 [fwmailinglis] charset="us-ascii"
  + 266733 [cminear@se u] While I believe that Felix's analysis is valid, the problem is that
    266736 [dangerwillro] I wouldn't call it a bug exactly, it does do what it is written to do.
    266738 [RubyTalk@gm ] If it is a bug change toplabel in common.rb to this
    266740 [beers@ta le ] think it is missing an important use case.  In "http://3beers-wrk",
    266746 [fwmailinglis] charset="US-ASCII"

Can't install//use the scrubyt gem? LoadError: no such file to load -- parse_tree_reloaded. What did I wrong with installing this gem?
266701 [kazaam@ol co] sudo gem install mechanize parsetree ruby2ruby hpricot scrubyt
266702 [kazaam@ol co] the solution was not to install parsetree but parstreereloaded :)

Help design a plugin system for a DSL
266705 [chris.lowis@] myDSL do
266744 [paradisaeida] With a dynamic language as flexible as Ruby, using a 'plug-in'
266747 [chris.lowis@] Thank you for your comments. Apologies if my explanation was unclear.

Ruby Library for dealing with mbox files
266713 [bbense@te em] I'm working on rewriting my email filtering hacks and I need a
271626 [dynalt@dy al] Did you ever find a solution? I am trying to parse Thunderbird email

IPAddr as Hash table key and accessing the mask_addr
266718 [nigelc@gm il] I'm using IPAddr objects as hash keys. So I need the hash and eql?

266721 [Bill.Saunder] ...
+ 266724 [stefano.croc] It means that you've called a method, put its arguments in parentheses and put
+ 266727 [bigboss64@ip] It may help if you could include (inline, not attached) some code examples

How to make an array of hashes to a single array with all the values of these hashes ?
266728 [kazaam@ol co] Take a look at this,
+ 266731 [phrogz@ma .c] my_array.map{ |h| h[:url] }
| 266737 [dejan.dimic@] The beauty is that you can do the same stuff in so many different
| 266741 [yermej@gm il] my_new_array = myvalue.inject([]) {|arr, h| arr + h.values}
| 266816 [shortcutter@] That's already pretty good (you used #inject ;-)) but this one is
| 266818 [caduceass@gm] Nice.  You beat me to it.  One of these days, though, I'll read all
| 266856 [shortcutter@] *gulp*
| 266875 [caduceass@gm] Hopefully, everybody took that in good stride :)
| 266909 [shortcutter@] I can speak for myself only but I did.
+ 266754 [florian.assm] myvalue.to_s[3..-1].split('url')
+ 266798 [kazaam@ol co] thanks guys! dimas solution showed me my error
  266815 [caduceass@gm] It's about scope.  I'm sure the veterans here can give you a thorough