225966-227146

225695-226923 subjects 226154-230629

^ fork, trap and exec. Pickaxe typo?
225966 [jashmenn gma] trap("CLD") {
+ 225967 [jashmenn gma] Another question, trap("CLD") should be called even with a non-zero
+ 225969 [hgs dmu.ac.u] # exit
  225973 [jashmenn gma] Yeah, but how do I wait for an unknown amount of time? It would seem
  225979 [hgs dmu.ac.u] puts Process.waitall
  225982 [jashmenn gma] This is so strange. I feel that I am really missing something here.
  + 225988 [rakrok gmail] What you want is SIGCHLD.  s/CLD/CHLD/
  | 225990 [rakrok gmail] Apologies, that doesn't change anything.. /me should really test first
  + 226030 [m_goldberg a] I think this causes a conflict with Process.waitall below. I don't

^ Unknown ruby processes show up in "top" when running cronjob
225968 [observatory ] I have a ruby (rails) cronjob.
225976 [nospam nosit] Yes.
+ 226172 [pcdavid gmai] command uses a sub-shell to execute the command line, so: cron
+ 226238 [observatory ] I don't think that's the case, I'm talking about two more "ruby"
+ 226353 [observatory ] I don't think that's the case, I'm talking about two more "ruby"

^ Why is slice ignoring my fields at the end of the string?
225970 [dmorin gmail] I'm not sure if this is a bug with the slice method, or if I'm just
225974 [hgs dmu.ac.u] OK, but using what code?

^ Split!  I meant split.   (Re: Why is slice ignoring my
225971 [dmorin gmail] "split".
225972 [dmorin gmail] Split!  I meant split.   (Re: Why is slice ignoring my

^ Fast 32 bit ints in ruby ?
225975 [devesh.agraw] I want an efficient implementation of an Ipaddress class. The ones I
225998 [vjoel path.b] p "192.168.1.2".split(".").map{|d|Integer(d)}.pack("C*")

^ webservices status in rails
225977 [snacktime gm] I heard rumors that webservices as they are now in rails was going to
+ 225980 [cremes.devli] The new REST support in the upcoming Rails 1.2 promises to make Rails one of the premiere platforms for building web services. Rails handles the server side beautifully. It assumes the data marshalling will be done with xml, but there's no reason it couldn't be extended to include SOAP envelopes.
| 226218 [snacktime gm] The problem with REST is that it's not widely known, and most
+ 225983 [tom infoethe] FWIW, I've got a server API (getindi.com) that's completely based on
  226003 [snacktime gm] Thanks Tom!  Good to know.

^ getting volume names in windows
225989 [rubyeu yahoo] Does anyone knows how can you get the volume name of a drive in windows?
226048 [jan.svitok g] I guess there's some WINAPI (use WIN32API) for that, or WScript (COM
226076 [rubyeu yahoo] Jan Svitok escribióº
226109 [jan.svitok g] Listing 4.3 Enumerating Disk Drive Properties
226131 [rubyeu yahoo] Jan Svitok escribióº

^ Pascal & Ruby Link
225992 [badquanta gm] First of all, hello.  My name is Jon (BadQuatna) Sawyer and I'm somewhat new
226015 [hal9000 hype] [interesting snippage]

^ Hpricot - best way to parse based on comments
225995 [jerome tut0r] <html>
+ 226000 [keith audiob] keith@devel ~ $ xml sel -t -m '//comment()' -v '.' -n simple.xml
+ 226440 [nospam nosit] The best and easiest way to parse this file using Hpricot with your required

^ Re: assert_raise question
225996 [efine145-nos] Agreed.

^ Using two justifications on the same line.
225997 [shiloh.madse] Ok, so the chapter I am working on now is asking for me to write a
+ 226037 [m_goldberg a] The problem is that an array doesn't respond to either ljust or
| 226059 [shiloh.madse] Ok, I think i understand that...however the shift function hasn't been
| + 226060 [martindemell] If you know the chapters and pages arrays are well-formed (that is,
| + 226135 [m_goldberg a] Sure. In Ruby there are always many ways to achieve a goal. How about
+ 226439 [nospam nosit] / ...

^ New SWIG release
226007 [znmeb cesmai] For those of you working with SWIG, there is a brand new release with lots of bugfixes.

^ Fwd: Please Forward: Ruby Quiz Submission
226019 [james graypr] ...

^ Bug in ruby?
226023 [kamipride102] Well, I've spent the last hour or so debugging one of the stupidest
+ 226025 [brabuhr gmai] string.index(starting).+(starting.length)
+ 226026 [collinsj sea] + is being called on string.index(starting) not length. I'd check to
| 226056 [robert.dober] which is expected behavior
+ 226166 [martindemell] Ruby has a message-passing object model - every operation consists of
+ 226438 [nospam nosit] It is a stupid error, but to say it diplomatically, the responsibility
| 226446 [allergic-to-] So, how'd it go?  Was it finished in time and under budget? :-)
| 226448 [nospam nosit] I think the OP is a student, in any case someone who isn't that into
| 226455 [allergic-to-] Yes, that's pretty apparent - I was being jocular, or perhaps,
| 226459 [nospam nosit] / ...
| 226688 [allergic-to-] Thanks for the clarification.  I had forgotten that there were two
+ 226463 [ihatespam ho] Just out of wild curiosity, did you ever figure this thing out?  We're
  226503 [allergic-to-] str.index(substring [, offset])   => fixnum or nil

^ ADV: Ruby Professional Series
226024 [obiefernande] Addison-Wesley Professional announces its launch of the first book in

^ array question
226029 [chen_li3 yah] I want to build a new array from an old one with every element being
+ 226031 [wilsonb gmai] A couple of ways: (there are probably dozens more)
| + 226032 [has.sox gmai] This would not duplicate the inner elements though.
| | + 226034 [has.sox gmai] b = a.inject( [] ) { |a,e| a << [e,e]}.flatten[1..-2] }
| | | 226036 [dblack wobbl] I so much think it's time for flatten to take an argument, specifying
| | | 226098 [vjoel path.b] 100% agreement here. The problem is easily solved if you ignore the
| | | 226123 [pete.yandell] a.zip(a).flatten[1..-2]
| | | + 226128 [dblack wobbl] I decided to avoid flatten (see my earlier comments).  To be
| | | + 226140 [botp delmont] #    a.zip(a).flatten[1..-2]
| | | + 226180 [daniel.schie] I'm surprised nobody has suggested
| | |   226220 [martindemell] ary.enum_cons(2).inject([]) {|a, i| a+i}
| | + 226041 [jbrains762 g] b = a.map { |each| [each,each] }.flatten[1..-2]
| |   226044 [chen_li3 yah] Thank you but elements in the array are in random order.
| + 226035 [dblack wobbl] [1,2,3,4,5]  =>  [1,2,2,3,3,4,4,5]
| + 226038 [chen_li3 yah] I run  array=[1,2,3,4,5]
|   + 226039 [wilsonb gmai] Yeah. Sorry. I didn't read your question clearly enough. I apologize
|   + 226053 [botp delmont] # I run  array=[1,2,3,4,5]
|     226078 [chen_li3 yah] Thank you all for your invalulabe inputs.
|     226088 [efine145-nos] This is the best I could come up with. It works with any kind of element
|     + 226090 [roseanne jav] I don't know why we need flatten, it is flatten before you do it.
|     + 226091 [louis.j.scor] I love Enumerator so much =)
|     + 226092 [efine145-nos] And a more efficient solution (thanks to Reid Morrison) is
|       226095 [louis.j.scor] Need to take care of size == 1
+ 226033 [dblack wobbl] require 'test/unit'
+ 226052 [flori nixe.p] c = a.size > 2 ? a[0, 1] + a[1..-2].inject([]) { |b,x| b << x << (x.dup
+ 226207 [w_a_x_man ya] => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+ 226321 [w_a_x_man ya] => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  + 226208 [shortcutter ] irb(main):007:0> arr=(1..10).to_a
  + 226216 [dblack wobbl] I *still* don't feel comfortable with that one :-)  The flatten
  + 226331 [shortcutter ] irb(main):007:0> arr=(1..10).to_a
    + 226212 [w_a_x_man ya] This demonstrates an excellent understanding of inject and
    + 226322 [w_a_x_man ya] This demonstrates an excellent understanding of inject and
      + 226214 [shortcutter ] Thank you!
      + 226323 [shortcutter ] Thank you!
        + 226226 [w_a_x_man ya] Ha, ha.  Also ugly.
        + 226325 [w_a_x_man ya] Ha, ha.  Also ugly.
          227146 [aotianlong g] your name looks like a chinese , and i'm too.

^ Is there a class that can control the command window
226049 [dou_yifan ya] I use ruby to do testing.
+ 226057 [shiwei1.zhan] exec(command [, arg, ...]);
| 226141 [dou_yifan ya] No, I know exec and system is the method to run OS cmd in cmd window,
| 226145 [martin snowp] It sounds as though you're looking for Win32::Console
| 226146 [dou_yifan ya] Thanks, Daniel.
+ 226167 [martindemell] If you don't find anything, you could probably use popen4 as the basis

^ SOAP4R logging
226050 [gareth.adams] Is there an easy way to see the output sent by SOAP::WSDLDriver? I'm getting
226086 [dsledge appr] Try this. It will write the request and response to some log files.
226175 [charlesmbowm] also, try calling your app with -d (ruby -d yourfile.rb)
226371 [mattrose fol] obj = ::SOAP::RPC::Driver.new

^ Error Install ruby (newbie)
226055 [total_sc yah] I have installed ruby on windows using (One-Click
+ 226058 [jan.svitok g] try just
+ 226079 [smartgpx gma] Jan's answer is correct. [You don't need the option at all,
  226142 [total_sc yah] thnx for advice,I have alredy followed your
  + 226148 [smartgpx gma] [gem installation dialogue suppressed. dj]
  + 226151 [jan.svitok g] Now you have rails installed. Never mind the last error. Next time,
    226152 [total_sc yah] ok ,but can i use instant rails to connect to another
    226153 [jan.svitok g] Instantrails has the same as you have now most problably. Either it

^ Active Record out of rails: still assumes id?
226061 [cgallagher g] Im currently writing a ruby script that will connect to a database using
+ 226062 [gabriele.mar] I guess your table will have a key, anyway. You just have to tell
| 226125 [leslieviljoe] Though if you do use set_primary_key, remember that in the model
+ 226063 [dblack wobbl] The id field is automatically created when you use ActiveRecord
  226073 [cgallagher g] I solved this by just throwing in the id field. Wasnt really a big thing
  226106 [damphyr free] I'm actually using active record in a similar fashion. I just want the
  226136 [ezmobius gma] I was able to get ActiveRecord migrations working outside of rails
  226334 [leslieviljoe] Great stuff!

^ mechanize question
226064 [peter rubyra] form.selectlist.options[2].select
226065 [peter rubyra] Meanwhile, after browsing the RDoc of WWW::Mechanize::GlobalForm I have
+ 226102 [gilesb gmail] Hey, I don't know the answer to this question specifically, but I did
| 226104 [gregory.t.br] Mechanize now has direct support (and is implemented on top of) hpricot. [IIRC]
+ 226360 [aaron_patter] The select list is treated like a regular field.  Say you have a select
| 226370 [why ruby-lan] If Hpricot cannot handle the tag, please open a ticket[1] or mail me, so I can
| 226399 [peter rubyra] Sure :-) I am just beginning with mechanize so I don't have a real-life
+ 226437 [nospam nosit] You mean, like, closing the <form> ... </form> tag pair? Well, yes, closing

^ name conversion: search terms?
226067 [hgs dmu.ac.u] I'm doing some code generation and need to convert from CamelCase to
+ 226068 [bruno exceli] Ruby on Rails have similar things. You should take a look at Active
| 226070 [hgs dmu.ac.u] Thank you.  That's splendid.
+ 226134 [ezmobius gma] class String

^ Re: FastRI 0.2.0: full-text searching, smarter search strate
226072 [thomas.nitsc] remote access doesn't work for me. Anyone got this up an running? I did
+ 226074 [slamboy gmai] Well on a cisco router, setting up an ACL like that would prevent anyone
+ 226075 [ mfp acm.org] ====================
  226080 [thomas.nitsc] Thx a lot. It works perfectly that way. It's almost sort of RTFM, but I

^ Ruby unit testing
226077 [cgallagher g] I have a ruby script that I would like to apply unit testing against but
+ 226094 [smartgpx gma] Perhaps ZenTest might be of interest? It will scan your code and sketch
| + 226124 [cgallagher g] thanks for the reply.
| | 226126 [leslieviljoe] Les
| | 226130 [pat.eyler gm] Well, that one's a bit dated  (it's also shipped with ZenTest itself).  A
| + 226129 [jan.svitok g] This is how I'd do it. I don't know the details, so your actual code
|   + 226132 [pat.eyler gm] * First, refactoring the code before you have tests is never a super
|   + 226169 [cgallagher g] thanks for the long post Jan, youve given me a good insight into the way
|     226190 [jan.svitok g] Never mind. Here's what you can do: I see you iterate over Results
+ 226127 [leslieviljoe] I don't have time to look at your code now, but maybe someone will

^ ruby on pure 64-bit computer
226082 [rtilley vt.e] I recently obtained a AMD x2 5200+ 64 bit cpu and motherboard. I have installed
+ 226083 [dudu dudu.ro] FWIW I've been running ruby on the amd64 port of FreeBSD for a few
+ 226501 [kbloom gmail] I use Ruby on Debian/AMD64. Debian has .deb packages of ruby, but you'll

^ Text extraction from PDF files (non-European languages)...?
226084 [Nuralanur ao] Dear all,
+ 226085 [hannes.wyss ] Axel
+ 226137 [kou cozmixng] Which version of pdftotext did you use? Xpdf or poppler?

^ RMagick build error...please help
226087 [friofool gma] [root@localhost RMagick-1.14.1]# make
226089 [friofool gma] my problem is solved

^ [ANN] Piston 1.2.1: import problem corrected
226093 [francois.bea] * Import subcommand would fail with a "svn: Explicit target required('vendor/rails' interpreted as prop value)" error.  This was a minorerror in the import code.  Reported by Daniel N.* The import subcommand could import another revision than what wasintended, if HEAD was updated while the import is in progress.

^ Reminder -- MountainWest RubyConf Call for Presenters
226097 [pat.eyler gm] I just received another presenter submission for the MountainWest

^ OS X File information question
226100 [jonathan wad] OS X (tiger) stores some useful information about files, including
226112 [gabriele.mar] Give a look here: http://developer.apple.com/macosx/spotlight.html
226119 [fred 82ask.c] It's a little more tricky writing to these: to write a finder comment
+ 226157 [jonathan wad] Gabriele, Fred
+ 226457 [has.temp3 vi] You can do AEs from C but it's a bit tedious. Much easier with a

^ Re: [OT] Bug in ruby?
226101 [david vallne] This is a subject line that's mildly infuriating. I wonder if I can
226111 [charleshixsn] There have been many that I thought were "bugs in Ruby", though mainly
+ 226121 [leslieviljoe] I have also previously requested that this get fixed in a future Ruby.
| + 226139 [david vallne] Meet my good friends, local variable, and return value checking. You'll
| | 226149 [leslieviljoe] It just seems like it would be easier than that, since Ruby is an
| | + 226161 [collinsj sea] The thing is, Ruby is not returning "nil" error messages, it's returning
| | + 226165 [david vallne] Probably not, to my best knowledge, a source file is always tokenized
| | + 226461 [nospam nosit] Remember in modern interpreted languages that interpretation and execution
| + 226462 [shortcutter ] Frankly, in this case I would attribute that to the bug searcher and not
+ 226138 [david vallne] I'm not aware of a programming language that DOES report this. Remember
+ 226147 [charleshixsn] I admitted it was a hard problem ... but, well,...
| 226460 [nospam nosit] / ...
+ 226442 [nospam nosit] / ...

^ rmagick install problem
226103 [friofool gma] /usr/bin/ruby -I /home/user/appli/tmp/RMagick-1.14.1/./lib -I
226436 [nospam nosit] Ruby is telling you that a required library file is not present
226588 [TimHunter nc] For future questioners who find this thread via a search engine, this

^ [ANN] Missoula Ruby/Rails Group - December Ruby Tuesday Gathering
226105 [jgarvin.list] December 5th marks the third Ruby Tuesday gathering of the Missoula Ruby

^ ActiveRecord
226107 [cyclewood_lt] First Post.
226113 [drbrain segm] Rails sucks in this regard, really sucks.
+ 226116 [cameron.mcbr] This is really, really sad.
| 226117 [drbrain segm] Eric Hodel - drbrain@segment7.net - http://blog.segment7.net
| 226118 [james graypr] Ouch.  They didn't apply it or refused it?  That's disappointing
| + 226122 [leslieviljoe] Wow, and I had so much respect for the rails camp. Though maybe they
| + 226144 [drbrain segm] I think it ended up being both.  They accepted a patch for
|   226155 [cyclewood_lt] riiiiiiiiiiiiiiiiiiiiiiight!!
+ 226160 [martindemell] Well, or the slightly less extreme 2>&1 | grep -v 'lib/active_record'

^ Is this possible?
226108 [jmdjmsmith m] Is there anyway to override the STDIN of a ruby program, do that when a
226110 [aredridel nb] You can use IO#reopen on STDIN, or you can undefine the constant and
+ 226114 [drbrain segm] Please don't mess with STDIN, STDOUT and STDERR unless you really,
+ 226115 [jmdjmsmith m] Do you think you could expand? (i am fairly new to Ruby) what actually

^ Hpricot/Rubyful Soup comparison
226120 [weyus att.ne] Has anyone done a head to head comparison of Hpricot and Rubyful Soup
+ 226150 [peter rubyra] I did not do any benchmarks, but I am scraping a lot of relatively big
| 226156 [ramalho gmai] HPricot is partially written in C, so it should be faster than a
| 226163 [peter rubyra] true
| + 226171 [ruby anthrop] } > Also, RubyfulSoup aims to be very resilient to malformed markup,
| | 226195 [why ruby-lan] Mmm.  Okay, good point.  So if a tag comes in as self-closing, keep it that way?
| + 226176 [ramalho gmai] Thanks for the input, Peter. From your opinion and other, it seems
|   226185 [weyus att.ne] Thanks for all of the comments.
|   226194 [why ruby-lan] I totally agree with you regarding preserving the original markup.  In fact,
|   226197 [weyus att.ne] sweet.
|   226221 [weyus att.ne] Actually, I'm kind of hoping that I can make mods. to the parse tree,
|   226223 [why ruby-lan] With `to_original_html`, no malformed HTML is fixed.
+ 226173 [hutch recurs] I switched from Rubyful Soup to Hpricot a while ago. The reason was
+ 226227 [gilesb gmail] I have, in late August, and at that time, we found that Rubyful Soup
+ 226304 [henryj parad] hpricot. The hpricot version was MUCH faster, had less code and is
+ 226456 [lrlebron gma] I've used both Hpricot and Rubyful Soup to parse the Google News page
+ 226482 [rosco roscop] I recently did a small head-to-head with RubyfulSoup, Hpricot, and the
  226552 [why ruby-lan] Thanks, Ross, that was great.  Libxml2 has HTML fixup stuff?  That's
  226619 [rossrt rosco] Surely does: http://xmlsoft.org/html/libxml-HTMLparser.html . It's a new
threads.html
top