387493-391473

387298-387585 subjects 387679-388267

[ANN] ruby_parser 2.3.0 Released
387493 [ryand-ruby@z] ruby_parser version 2.3.0 has been released!

TCPSocket recv's nil with gets() if the server crashes?
387497 [sirwillard42] I don't claim to be much of a programmer, and I am also new to RUBY, so
+ 387498 [normalperson] I'll try to explain things with that in mind (but feel free to ask for
+ 387500 [bbxx789_05ss] select() returns nil if it times out--otherwise it returns a non-nil.
+ 387501 [shortcutter@] ver
+ 387517 [sirwillard42] Thanks for the answers!  I guess I needed to RTFM a little more, the
  387522 [normalperson] It depends on the protocol.
  387523 [gwtmp01@ma .] In additional to worrying about a server failing, you must always worry =

Ruby for multiple platforms
387504 [James.French] Morning,
387507 [shortcutter@] Gems may need a native build so I'd probably rather have different
387536 [James.French] or windows checked into a 'buildtools' subversion repository. I've added qu=
387557 [matma.rex@gm] I'm pretty sure the gem cache is only needed for `gem pristine` command.

Re: Recursive file listening?
387508 [andrius.cham] Sorry for bumping old thread, but as it was first result for me in
+ 387509 [adam@ap es o] You can also give Dir["**/**/*.rb"] a try. It'll give files in the current
+ 387510 [jeremy@bo p.] jeremyb@JEREMYB ~/tmp/test
| 387511 [adam@ap es o] Clearly I don't use globs enough. :)
+ 387516 [bbxx789_05ss] You are wrong.

green shoes on archlinux x64 error...
387513 [serialhex@gm] ok, so i brought this up in the shoes ML, and they suggested i ask here.
387526 [ashbbb@gm il] Oh, I see.
387528 [serialhex@gm] it runs fine on my 32-bit computer... though it's not *nearly* finished (the
387547 [ashbbb@gm il] I doubt of installing gtk2 again.
+ 387551 [serialhex@gm] unfortunately, i am not at my x64 computer today (it's at work, i'm not) so
+ 387601 [serialhex@gm] ~~~~~

connect google sketchup pro to MySQL using ruby script
387524 [jeny.joshi@g] I am unable to extract data from MySQL in googlevsketchup using ruby
387525 [jeny.joshi@g] I am unable to extract data from MySQL in googlevsketchup using ruby

Unexpected behavior of Ruby array
387530 [suvankar.17@] I was going through the exercises at http://rubykoans.com/ and got
387533 [adam@ap es o] There's discussion about this at http://www.ruby-forum.com/topic/1393096
+ 387534 [adam@ap es o] Oh, and http://redmine.ruby-lang.org/issues/4541
+ 387535 [dan@na hb r.] Gary Wright's explanation in the thread linked above is very complete =
| 387558 [gwtmp01@ma .] and clear.
| 387577 [shortcutter@] Yeah, but what about the grass on the other side?  It's still greener.  Darn.
| 387637 [colinb2r@go ] with
| 387665 [shortcutter@] g with
| 387697 [colinb2r@go ] ng with
+ 387541 [phrogz@me co] ...
  387636 [colinb2r@go ] * http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/368268

help with LOAD_PATH when building from source on Mac OSX Lion
387537 [James.French] I've successfully built ruby (1.9.2-p290) from source on Mac OSX Lion but I=
387538 [shevegen@li ] Why not pass the --prefix to configure when compiling?
387540 [James.French] Thanks, I wasn't sure how to do that. It required an absolute path but /Use=
387542 [shortcutter@] sers/~/buildtools/ruby/1.9.2
388160 [James.French] Users/~/buildtools/ruby/1.9.2

Test passes alone, but fails under rake...
387543 [mcpierce@gm ] In my development environment (Fedora 15/64-bit, Ruby 1.8.7) I'm

Executing the output of a look
387544 [spambocks@ya] (1..12).each do |i|
+ 387545 [isaacbfsande] you could use eval, passing in the string.
| 387556 [b.candler@po] Beware that eval can execute *any* ruby code, which in turn can execute
+ 387546 [jgabrielygal] (1..12).each do |i|
  387554 [shortcutter@] There's also exec and if one wants to collect the output there is
  387560 [jgabrielygal] El 08/09/2011 17:27, "Robert Klemme" <shortcutter@googlemail.com> escribi=

Re: Executing the output of a loop
387548 [spambocks@ya] I have tried the using backticks / system / %x but get the following
387549 [isaacbfsande] backticks execute it as though it were in the shell, not as ruby. Using eval
387550 [spambocks@ya] Nice. Thank you Issac.  That worked perfectly.
387568 [shevegen@li ] It does not matter how they are "supposed" to be used.
+ 387572 [matthias@wa ] It would be better to move from t1, t2, กฤ t12 to an array t[1..12] (or t[0..11]) and then use each on that. While legit, eval shows a bad design
| 387574 [spambocks@ya] Thank you all for the additional feedback and help.  Whilst eval is
+ 387576 [adam@ap es o] It will solve the problem, yes, but in not using an array, you lose
+ 387579 [josh.cheek@g] It is the wrong choice, not because of security risks, but because it means

undefined method??
387561 [joec_49@ho m] When I press MSG or EXIT buttons I get undefined method errrs for the
+ 387562 [johnf@bi sb ] method from the MyForm class". However, you've defined #domsg as an
+ 387564 [joec_49@ho m] how do I fix it?
| 387565 [alanfung@at ] undefined method??
+ 387575 [joec_49@ho m] that worked! - thanks much!

[ANN] usp.ruby - Unix systems programming in Ruby list
387563 [normalperson] A mailing list dedicated to Unix systems programming in Ruby

Ruby Readline - do something when a key combination is pressed
387566 [shevegen@li ] When I use readline, I would like to run an action if a key combination
+ 387630 [gabriel.horn] It's possible but it's not clear if you're talking about invoking it in
| 387658 [zipizap123@g] If it was a unix shell, what would be the solution?
+ 391473 [shevegen@li ] Hmm. This seems useful. Can someone explain how this works?

Re: usp.ruby - Unix systems programming in Ruby list
387567 [shevegen@li ] I am using Ruby Forum vs. the Forum.
387571 [normalperson] You can download mbox archives for offline viewing, and Librelist
387643 [markus@fi ch] The thing is: "yet another mailing list"; though I'm quote interested, I
387677 [normalperson] I never felt it completely appropriate for ruby-talk given many non-Unix

Submitting a URL with Mechanize
387573 [spambocks@ya] puts master.showURL
+ 387578 [pbruna@it li] Does showURL returns the URL?
+ 387580 [josh.cheek@g] puts sends the url to standard output. That isn't what you want, you want to

Regex Problem
387581 [cyril.varghe] I am trying to match this pattern: >1_9_1912_F3
+ 387582 [podenski@me ] Check out rubular.com where you can interactively match text with your regular expression. This will help you confirm when you're on the right track.
+ 387583 [cwprogram@li] ...
+ 387584 [cyril.varghe] Thanks Pat rubular helped a lot.
  + 387603 [phrogz@me co] Or even: /((?:\d*_){3})/
  | 387711 [shortcutter@] Cyril, are you sure you want to also match "___"?  If not, use
  + 387712 [jgabrielygal] and * means 0 or more, which I'm not sure it's really what you need. If you

Creating a hash from two arrays
387586 [simonharriso] hash = {{"A" => 'alpha'}, {'B' => 'bravo'}} etc...
+ 387587 [cwprogram@li] =2C "K"=2C "L"=2C "M"=2C
| + 387590 [cwprogram@li] "=2C "K"=2C "L"=2C "M"=2C
| + 387592 [astounding@g] This works in 1.9 at least.
| | 387594 [adam@ap es o] Ah, yes, this works without the splat, too. I seem to remember that
| | 387595 [astounding@g] ansi = %w{Alpha Bravo Charlie Delta ...... Zulu}
| | 387709 [shortcutter@] ansi =3D %w{Alpha Bravo Charlie Delta ...... Zulu}
| + 387593 [adam@ap es o] I wouldn't use inject ! You aren't really reducing something down to
+ 387589 [christopher@] ...
+ 387591 [adam@ap es o] First, {{"A" => "alpha"}, {"B" => "bravo"}} isn't valid syntax. You
+ 387623 [simonharriso] Thanks for all the help. I knew about zip but as both arrays have to
+ 387720 [simonharriso] Robert, I seem to remember that it was you who said you'd implemented
  387733 [shortcutter@] Currently I have no idea where that code went. :-)  If I dig it up I'll post it.
  387755 [matma.rex@gm] Why would anyone do that is beyond me.
  387759 [shortcutter@] Well, I am trying to be kind and provide the information I have.  I

Strings in a Ruby 1.9 C extension?
387588 [astounding@g] VALUE str = rb_str_prealloc(size_t len);
387597 [adgar@ca bo ] rb_str_buf_new(long capacity) is what you're looking for. The capacity argum=
387600 [astounding@g] Yeah, that's what I've been doing.  I must have missed that as that's

newbie ruby installation malloc issue
387596 [mark_f_edwar] i was able to build my own 1.9.1 with no problems (except it does not
+ 387604 [spiralofhope] For what it's worth, I also had issues with compiling on my own (for
+ 387617 [mark_f_edwar] thank you spiralofhope -
| 387622 [dan@na hb r.] I strongly urge you to install rvm.
+ 387620 [mark_f_edwar] what seems so strange to me is that 1.9.1 can build successfully, but
+ 387640 [mark_f_edwar] it appears in order to install rvm i have to have "git" working.
| 387642 [josh.cheek@g] IDK, I was able to download a binary of git (I'm on OSX), so super easy.
+ 387672 [mark_f_edwar] thanks josh.
  + 387673 [josh.cheek@g] Yeah, that's weird, such an important resource should be made available.
  + 387675 [hassan.schro] The first hit from googling `git download` is <http://git-scm.com/download>;
    387676 [josh.cheek@g] For Linux, that page links to the page on Kernel.org that is "Down for
    387681 [hassan.schro] Ah, indeed, you're right. Well, time to bite the bullet and install from

Re: ruby-oci8 2.0.6
387598 [jchivian@ph ] I am having trouble getting oci8 to load.
387684 [ruby@za sh n] This is just a guess, but are you running the same Ruby version via rvm =
387714 [jchivian@ph ] Yes, it is the same version.  I actually removed the ruby packages that
387775 [jchivian@ph ] HEAVY SIGH!!!

null pointer given - hash
387599 [angeloalvesf] ...
387602 [bbxx789_05ss] hash = {'a' => 10, 'b' => 20}
387610 [angeloalvesf] I mean res.each_hash and res.fetch_hash mysql, not hash method.

Convert ruby.rb to msdos exe file?
387605 [joec_49@ho m] I am rewriting numerous vbscript programs in ruby. Is there a way to
+ 387606 [sebastian.ba] have a look at ruby2exe
| 387608 [matma.rex@gm] I don't think there's such a thing as ruby2exe. You probably meant
| 387609 [sebastian.ba] Oh, yes that is exactly what i meant ... :)
+ 387611 [luislavena@g] Works with either Ruby 1.8.7 or 1.9.x

Large file reading
387607 [cyril.varghe] What is the most efficient way of reading two large files at the same
+ 387612 [bbxx789_05ss] File.open("xml.xml") do |f|
+ 387710 [shortcutter@] What exactly are "header lines" in your case?  Without knowing the
  387774 [cyril.varghe] A header line starts with ">"
  387777 [brabuhr@gm i] Do you have guaranteed ordering for the header lines in each file?
  387790 [cyril.varghe] The headers should be in the same order in both files. Some headers are
  387801 [shortcutter@] So do you want to use the first file as template for checking only and

[ANN] UnXF 2.1.0 - Un-X-Forward* the Rack environment
387613 [normalperson] Rack middleware to remove "HTTP_X_FORWARDED_FOR" in the Rack environment and

how to write data in binary to a file?
387614 [yw_hi@16 .c ] I want to write the data into a file in binary mode. The file is opened
+ 387615 [normalperson] You need to pack the data into a string before writing.  The following
+ 387618 [bbxx789_05ss] All that does is turn off newline conversions, so if you write \n to a
| 387629 [b.candler@po] Oh no... yet another inconsistency from ruby 1.9.
| 387635 [cmdjackryan@] You obviously aren't aware what Extended ASCII (aka ASCII 8bit) is.
| 387639 [b.candler@po] I'm not? Then please explain it to me. What I know so far about ruby 1.9 encoding I have documented at https://github.com/candlerb/string19/blob/master/string19.rb
| 387703 [shortcutter@] irb(main):001:0> u=3DEncoding::BINARY
| + 387721 [b.candler@po] Indeed.
| | 387734 [shortcutter@] The only special thing is that it is the "encoding" of a String's raw
| + 387723 [gwtmp01@ma .] I think the anomaly that Brian pointed out was that the transcoding =
+ 387632 [ofusiono@gm ] Did you try with File#syswrite?

[ANN] updog version 0.0.1 released
387616 [beholdthepan] What's up dog?

difference between 1.8.6 (rails 1.2.3) and 1.9.2
387619 [mark_f_edwar] i can have 1.8.6 installed for me with rails 1.2.3 - is there any
+ 387621 [ryand-ruby@z] an
+ 387628 [mark_f_edwar] agreed - but i hope to get rails up and running in a production capacity

Not 2 maps
387624 [list.push@gm] # I have this
+ 387625 [matma.rex@gm] A marginally faster solution would be
| 387683 [list.push@gm] I didn't mention it, but I was trying not to iterate. But, I guess I
| 387685 [cwprogram@li] The question here is going to come down to why you're so worried about spee=
| 387686 [list.push@gm] eed. What's your specific use case? The one you gave us seems to simplified=
| + 387687 [cwprogram@li] Garbage collection could be part of it=2C as the GC has to stop for the col=
| + 387695 [shortcutter@] What exactly do you mean by that?  If the array is given as is and you
+ 387689 [josh.cheek@g] I would personally use maps, but to do it without mapping it would look like
| 387691 [botpena@gm i] luv this inject code. hope matz can enhance inject further
| 387692 [josh.cheek@g] IDK, I feel like most places #inject is used, #with_object would be a better
| 387696 [botpena@gm i] ter
+ 387758 [list.push@gm] Thanks to everyone who offered some type of solution.

Installing ruby on 5.4 throws errors and doesn't create the make file
387626 [sridharpandu] I am trying to install ruby on my VPS and I get strange errors. Didn't
387627 [cwprogram@li] Hmm=2C that's kind of odd. Try yum installing autoconf and automake=2C then=
387645 [sridharpandu] Installed successfully

(Gem::RemoteSourceException)
387631 [ofusiono@gm ] I am troubled by this error again...
+ 387633 [luislavena@g] gem sources --remove http://gems.rubyforge.org
+ 387634 [ofusiono@gm ] Thanks but I wich it was that simple ;)

Problems with rubygems
387638 [timuckun@gm ] I am having some serious problems with rubygems and I can't figure out
387657 [shevegen@li ] It is typical for distributions to cripple packages.
387705 [timuckun@gm ] Well something was severly screwed up with my system and re-installing

require no such file to load
387641 [dzseymour@gm] Keep getting this annoying error "require no such file to load" when I
387644 [dzseymour@gm] I've found the answer here...

How do I make output generate a float without an excess numbers of decimal places?
387646 [theburrick@h] For example, my current code is
+ 387647 [dan@na hb r.] You might try using the % instance method of String.
| 387648 [theburrick@h] Would you mind explaining the
| 387649 [dan@na hb r.] There are quite a few online resources that cover the details
+ 387651 [list.push@gm] This is not as detailed but it may be worth a look.
+ 387662 [joec_49@ho m] I tried n.round(2) and gave an error - didnt want the 2 argument. I am
| 387669 [matma.rex@gm] In 1.8.x, round() simply rounded to nearest integer.
| + 387699 [shortcutter@] Also, rounding is rarely what one wants because it looses precision
| + 387837 [rogerpack200] or define your own round method
+ 387896 [joec54@gm il] roger....that class is clever and it works great - thanks!
  387900 [shortcutter@] Apart from that it's not rounding.  It's just a convenience way to

Running QueryInterface from WIN32OLE under ruby 1.8.7
387650 [idan.miller@] I'm using win32ole and trying to run a QueryInterface on an ole object

making an array of strings
387652 [joec_49@ho m] I want to make an array of strings, i.e boy, girl, cat dog
+ 387655 [zipizap123@g] # A- Create an array which elements are strings
| 387674 [josh.cheek@g] The delimiters are arbitrary, so you can use quotes if you want.
+ 387656 [shevegen@li ] array = %w( boy girl cat dog )
+ 387661 [joec_49@ho m] Thanks - works great.....how would I used %w to catch strings including
| 387667 [bbxx789_05ss] 1) Get rid of the commas.
+ 387680 [bbxx789_05ss] text.txt: ----
  387698 [shortcutter@] I'd do

De-listing of ruby-doc.org on ruby-lang.org?
387653 [astrochase@g] This may have been brought up before, but as a newbie Ruby programmer,
+ 387654 [james@gr ys ] I've found the 1.9 documentation on the site to be pretty OK.  I don't
| 387660 [astrochase@g] The one that just tripped me up was File.open. It isn't properly
| 387664 [james@gr ys ] Yeah, Ruby's primary documentation tool just doesn't show overrides as
| 387666 [astrochase@g] How does rubydoc.info achieve it? I'm really unclear as to what's gone
| 387668 [matma.rex@gm] While we're at it, I'll mention something annoying me to no end for
| 387670 [cwprogram@li] third
+ 387659 [shevegen@li ] It may not be out of date but documentation of Ruby is still a shame
  387671 [markus@fi ch] What happened to the call, AFAIC it was from you (I may be wrong, excuse

example of tk drop down menu needed
387663 [joec_49@ho m] I want to have a drop down whereby when I click on it, I get a number of
+ 387678 [joec_49@ho m] I should have said I need an example of tkcombobox
| + 387690 [justincollin] This one?
| + 387717 [nagai@ai ky ] See the sample scripts (especially, tkcombobox.rb)
+ 387702 [joec_49@ho m] that was a big help - thanks
threads.html
top