253107-308348 subjects 253526-254921

Methods as infix operators WAS:  Defending Ruby's OOP
253321 [sam@po er ou] I like this idea.  I was thinking

253325 [terryjbates@] ...

How to improve iteration
253330 [chas@va le .] Could you please point out how I can make this code more
+ 253333 [linguist@gm ] ...
+ 253337 [sepp2k@go gl] ar = ["a.txt", "b.txt", "c.txt", "d.txt", "e.txt"]
| 253378 [shortcutter@] def switch(letters, ordinals)
+ 253338 [Hakusa@gm il] Instead of doing for...in and use i as an index, you could do
  253346 [chas@va le .] Fantastic guys!  Thanks very much.

classes within a module?
253332 [aidy.lewis@g] Why do Rubyists generally hold a number of classes within a module?
+ 253335 [fophillips19] ...
+ 253336 [johnwilger@g] On May 28, 10:31 am, "aidy.le...@googlemail.com"

Feature suggest: implicit AND explicit variable definitions
253334 [Hakusa@gm il] I remember reading that, in Python, working with variables can be slow
+ 253349 [julesjacobs@] A language can be plenty fast with dynamic typing, but it does need
+ 253352 [dblack@wo bl] s/type/class :-)  Type and class are not the same in Ruby.

randomize array content
253340 [traktorman@g] what would be the simplest way (couldn't find a rand method) to
+ 253343 [alex@bl ck e] array.sort_by{rand}
| 253347 [traktorman@g] Thanks Alex, that would be it!
+ 253344 [apeiros@gm .] ary.sort_by { rand }

range object as a parameter
253341 [josselin@wa ] I trying to use a range object from an array of ranges objects as a parameter
253345 [alex@bl ck e] Here's a guess:  k is a String?  Array indices can only be Integers -
253353 [josselin@wa ] thanks that's it... I was not searching for the right problem... could

Trying to decide on a language to learn
253355 [nospam@bl de] I am trying to decide on a language to learn - and would be grateful for
+ 253356 [seebs@se bs ] Should be fine in virtually any language.
+ 253357 [alex@bl ck e] Yes.  There is a library included with Ruby specifically for this sort
+ 253372 [perrin@ap th] I, too, would recommend "Everyday Scripting with Ruby".  I'm reading it
+ 253404 [ari@ar br wn] If you'd like to learn a language that helps you understand how

[ANN] Futures and JRuby: The Omnibus Concurrency Library 0.2.1
253363 [mental@ry ia] Just a quick note that I've released version 0.2.1 of the 'concurrent'
+ 253364 [m.fellinger@] Do you plan on releasing the scheduler dependency soon? :)
| 253365 [mental@ry ia] Wow, I thought I'd already released it.  Guess not though...
+ 253366 [mental@ry ia] Incidentally, I'd like to hear from anyone using the library -- what

How compile a makefile in windows
253367 [marcelo.mach] I modified the archive object.c(in C:\ruby\src\ruby-1.8.6>), I created
253368 [nobu@ru y- a] Makefile is for make command.

$binding global var?
253369 [matthieutc@y] ...
+ 253370 [m.fellinger@] my ruby and irb don't know about $binding, it's not in the pickaxe and
+ 253371 [vjoel@pa h. ] $ ruby -ve 'p global_variables.grep(/binding/)'
  253373 [matthieutc@y] ...

253374 [jon@ff on ul] let rec nest ?(n=2) x f =
253375 [m.fellinger@] some people use _ as a temporary meaningless variable, just a
253394 [jon@ff on ul] Right, this is exactly what I guessed it was doing (it is the same in
253396 [jan.svitok@g] array.inject(0) {|sum, item| sum + item }
253398 [shortcutter@] Actually, #inject does not really make sense in this case.  All that
253408 [cdcarter@gm ] Actually, If it does what I think it does, the inject is needed
253409 [shortcutter@] Stupid me.  Of course you are right.  I should have taken more time to
253411 [shortcutter@] I was too fast (again).  Even though the return value is used, I'd rather do
253477 [logancapaldo] ...
253514 [B.Candler@po] Almost almost :-)
253525 [robert.dober] Robert was very quick indeed, he did not repeat the context of the
253645 [logancapaldo] ...
253648 [robert.dober] Obviously I am too stupid to test, sorry, I did test it, who knows how ;)
253718 [shortcutter@] Hm...  Thinking a bit more about this I am not sure I'd stick with my
253725 [robert.dober] As we are fooling around ;)
253734 [shortcutter@] You are aware that this does something different, especially will it

Ruby Bootstrap
253381 [leslieviljoe] ...
+ 253387 [dblack@wo bl] I believe it's compiled into the Ruby executable.
+ 253393 [B.Candler@po] Whatever you typed to get the ">>" prompt.
  253425 [leslieviljoe] ...

Overriding to_s
253382 [kimersen@gm ] I'm playing around with ruby trying to understand whats going on, and
+ 253383 [shortcutter@] Because puts will revert to something else (likely #inspect) if the
| 253413 [kimersen@gm ] My understanding of puts is that it puts the result of to_s.
| + 253414 [B.Candler@po] Yes, but what do you expect "puts" to do when it calls to_s on an object,
| + 253415 [shortcutter@] No, they are not the same because to_s returns the class.  You really
+ 253392 [rohandey@gm ] Not able to understand what you are actually asking. Can you put little
  253416 [kimersen@gm ] I'm working on an interface for some legacy data.
  253468 [grijalva@gm ] ...

Changing variables mid-script
253388 [fophillips19] ...
253440 [vjoel@pa h. ] Yes. You could use a signal handler or DRb, for example. For signals,

Few queries about Ruby implementation
253389 [sneha29@gm i] I have few questions about the current Ruby implementation. It would be

Which ODBC?
253391 [ronald.fisch] I am investigating ways to connect my Ruby (non-Rails) application on
+ 253395 [nephish@gm i] ...
+ 253424 [vasudevram@g] On May 29, 3:09 pm, "Ronald Fischer" <ronald.fisc...@venyon.com>
+ 253455 [gregory.t.br] And ActiveRecord works, too
  + 253456 [gregory.t.br] ...
  + 253573 [ronald.fisch] Ruport seems a bit of an overkill to me, but I would like to try
    253589 [gregory.t.br] DBI is not available as a gem.  It's somewhat tricky to install on

True arity
253397 [dan-ml@da 42] Is there a way to get the *maximum* number of arguments that a method
253405 [robert.dober] I am afraid I fail to understand, what would you define as the maximum?
253473 [dan-ml@da 42] In the last 2 cases you give the maximum would be Infinity. But in a
+ 253500 [m.fellinger@] arity is not able to show you all the information you need, default
+ 253512 [robert.dober] I know I missed something :(, indeed a good question, thx for
+ 253528 [charles.nutt] It could be done, but the current Ruby implementations don't provide
  253537 [dan-ml@da 42] It can be useful in some cases and it is *certainly* cleaner than the
  253554 [robert.dober] that is clever Daniel ;)

making entire spread sheet as active record
253399 [onlyforrkut@] I want to make entire spread sheet as active record model in ruby on
253403 [alex@bl ck e] Your best bet is to export the spreadsheet to a CSV, and import that CSV
253432 [gregory.t.br] Table("my.csv", :records => true) do |s,r|

operator =>
253401 [gianmh@gm il] What does the => operator do?
253406 [stefano.croc] h = {:a => 1, :b=>2}
253627 [gianmh@gm il] Thanks so much
253715 [pam@mo ra .o] in a next release? Correct?
253788 [nobu@ru y- a] It's a syntax sugar but traditional syntax is still valid.  The

installable 64-bit ruby for Windows XP 64
253410 [madhusudan.n] Is anybody using 64-ruby on 64-bit Windows?

Ruby & OCaml (was Re: Underscore)
253412 [ mfp@ac .o g] You can read that as
253499 [jon@ff on ul] Oh, of course! The ignored argument is the number 1 .. n.
253538 [ mfp@ac .o g] Indeed; I was just illustrating a part of Ruby's object model (mixins) with
253547 [jon@ff on ul] Right.
253823 [ mfp@ac .o g] Nothing has been heard about a native code compiler (Ruby makes it challenging
253959 [jon@ff on ul] Wow. That's absolutely fascinating.

UNO-Ruby Bridge
253418 [girish_chand] Currently I have a requirement to study the feasibility of implementing

Re: :Parser trouble
253421 [DPhillips@cy] -Doug

BOUNTY: Quicksilver plugins in Ruby
253426 [ruby@tc .m i] I'm offering a $250 bounty to the first person to provide a useful bridge
253431 [ben@bl yt in] This describes how to use PyObjC to write a Quicksilver plugin.  You
253442 [ruby@tc .m i] PyObjC is only supported in Quicksilver (apparently) through
253444 [ben@bl yt in] Hm, I didn't see that, but I probably just missed it.  Can you give me a

modules including other modules
253427 [tolsen718@gm] It appears that including module A inside another module B can cause
+ 253430 [onepoint@st ] It's a known problem that is apparently almost impossible to fix.  See
| 253435 [transfire@gm] Also know as the "Dynamic Inclusion Problem" or just the "Inclusion
+ 376430 [adriano.mitr] Well, this limitation can be circumvented by runnning the following
  377184 [adriano.mitr] makes it feels like it were part of the Ruby language.

Re: Broken RDT ?
253428 [brian.a.doll] You didn't mention the JVM version that you're running, so I'm

[ANN] EventMachine 0.7.2 has been released
253436 [garbagecat10] ...
253446 [garbagecat10] ...
253450 [tsuraan@gm i] ...
253463 [garbagecat10] ...
253599 [tsuraan@gm i] ...
253607 [garbagecat10] ...

Fwd: Please Forward: Ruby Quiz Submission
253437 [james@gr yp ] ...

Kiss your boring tasks goodbye: Everyday Scripting With Ruby
253438 [sharon_machl] Chances are, you do some boring, repetitive data-related tasks at work
253462 [Hakusa@gm il] Because many corporations that have leaders that are not tech savy
253464 [ben@bl yt in] From this, I infer that you're not a system administrator.  Note that
253504 [sean@ar is e] I have the book and I would describe it as entry level. If you automated
253509 [4fires@gm il] I've read the book too.
253566 [vasudevram@g] Though not directly to the topic of the book mentioned, I just wanted
253575 [vasudevram@g] P.S. Forgot to mention a disclaimer: I'm not affiliated with The

Re: How to adopt "Python Style" indentation for Ruby
253439 [bradphelan@x] Another version of pyrb.rb has been written that allows proper
+ 253453 [bradphelan@x] Sick, wrong and simple but unfortunately not my idea. There is a library
| 253490 [transfire@gm] Actually you can do this without even using the __END__. pyrb.rb can
| + 253493 [transfire@gm] But then again, why bother? Just make a new executable called
| + 253510 [bradphelan@x] I don't think that will work. I believe that Ruby will syntax check the
|   253632 [transfire@gm] Ah, right. Did something like this myself once but I had overlooked
+ 255707 [hipertracker] It is already written

ruby and google...
253441 [bitdoger2@ya] ...is there anyplace in google's web site describing using ruby with
+ 253443 [agorilla@gm ] Did you search?
+ 253449 [rmagick@gm i] Apress has a book about this: "Beginning Google Maps Applications with
  253476 [michael@sc u] solutions. The authors do a good job of conveying concepts and
  253561 [bitdoger2@ya] ...thanx all for all this info...i'll will look into all of these

Symbols vs. Strings
253445 [zablanc@ya o] I'm new to Ruby, but coming up to speed quickly.  One question I still
+ 253451 [rmagick@gm i] This question comes up a lot. You can search the list archives for
+ 253474 [miloops@gm i] Symbols are ligh-weight, they don't have so much methods to initialize
  253486 [grijalva@gm ] ...
  253521 [george@nu ru] One thing to keep in mind is that, as far as I know, symbols are

scRUBYt! 0.3.1 released
253447 [peter@ru yr ] scRUBYt! version 0.3.1 has been released with a plenty of new features
253452 [al_batuul@ya] ...

Project reference question
253454 [ariddle@su b] So we decided to give Ruby a shot at the company I work at. I have a
253458 [lyle.johnson] That should work. If you're using Subversion as your SCM system, you

Finding files associated with objects in Ruby
253457 [geoffrey.par] This is a bit of an odd request, but does anyone know how i would find
+ 253460 [mark.brooks@] There is a Kernel method called "caller" that can help you here.  It returns
+ 253471 [dan@fl en ra] This might not be fully general, but works in the basic case. If
| 253614 [dan-ml@da 42] This is the most obscure and arcane bit of ruby knowledge I have learned
| 253621 [dan@fl en ra] Thank Dave Thomas. I just decided to read Programming Ruby Part Three
+ 253516 [shortcutter@] Note that the caller approach either requires to manipulate the class

Re: Kiss your boring tasks goodbye: Everyday Scripting With
253465 [sharon_machl] You're right. The idea of the book isn't to write code that replaces

Calendar, Still Pictures, and Video for Rails
253466 [pdavidow@gm ] I am building a Rails app and would like to interface to a calendar
253480 [TimHunter@nc] Good luck!

Offline Rails Framework Documentation
253467 [pdavidow@gm ] I would like to download the Rails Framework Documentation (http://
+ 253470 [jan.svitok@g] 1. download wget, and run wget -m -k api.rubionrails.com (I'm not
| 253494 [james.britt@] Please do not encourage people to do this.
| 253670 [list.rb@gm i] ...
| + 253674 [jeremymcanal] rake doc:rails
| + 253675 [james.britt@] Get the source (i.e gem install rails -y)
|   253688 [list.rb@gm i] ...
|   253710 [dan@fl en ra] That's exactly what I get. On the other hand, doesn't using the
|   253930 [list.rb@gm i] ...
|   253962 [jan.svitok@g] 1. [1] says do
+ 253484 [miloops@gm i] $gem_server

Mobile (Cellular) programming libraries?
253472 [chuckmcknigh] Is anyone currently working on anything to implement WAP Push, SMPP,
+ 253475 [ecomba@ma .c] We are currently working on Rannel (http://rannel.rubyforge.org).
+ 253727 [jftucker@gm ] Working on proprietary TETRA protocols here.

Regexp to extract number with  hyphen
253478 [bcparanj@gm ] I have a text with "foo 01-02" in a string. I want to extract foo
+ 253482 [TimHunter@nc] Does this work?
+ 253483 [tim.pease@gm] "foo 01-02" =~ /(\d+)-(\d+)/
| 253487 [bcparanj@gm ] The regexp: /foo\ (\d+)\-?(\d*)/
| 253515 [B.Candler@po] What exactly are the allowed matches? Only num1-num2, or is num1 by itself
+ 253571 [kbloom@gm il] That's because the | operator in a regexp means either-or. So you're
  253577 [B.Candler@po] That particular example matches 11, but not 1.

Can Ruby be compiled against uclibc?
253479 [vargadanis@g] I am trying to target an ARM based system that will have limited
253496 [znmeb@ce ma ] Yes ... the "buildroot" toolset used by Gumstix and others has Ruby in
253497 [vargadanis@g] Ahm.. Maybe it is a little bit too late but I am afraid I didn't get
253559 [pchaganti@gm] ...

Static Libs for Ruby howto?
253488 [vargadanis@g] Do you think it is possible to build Ruby with static libs? If yes, how?
253492 [TimHunter@nc] The README file in the Ruby tarball has instructions for building with
253495 [vargadanis@g] Thanx Man... I got it. (^_^) I am a happy camper now

Re: fastthread 1.0
253489 [dteitsort@ho] That got me thinking, and I eventually concluded the recommended
253503 [mental@ry ia] fastthread does require 'thread' itself, so that shouldn't be a problem.

[ANN] Dhaka 2.2.0
253498 [mushfeq.khan] ...

Net::HTTP Logging in / Persistent sessions problem
253501 [subsume@gm i] I am able to login to a website at authenticate.domain.com but when I
+ 253522 [ecomba@ma .c] In your code you are basically getting the body of the response only.
| 253667 [subsume@gm i] Ok, great. After doing some studying I understand a bit more now. Thank
+ 253665 [aaron@te de ] automatically saved between each request, check out WWW::Mechanize.
  253668 [subsume@gm i] Oh. Then what does get_fields('set-cookie') do?

[SOLUTION][QUIZ] Fractals (#125)
253502 [jtruher@gm i] ...

Lone Star Rubyconf 2007 Call for Papers
253506 [jimfreeze@gm] The Lone Star Rubyconf 2007 Call for Papers is now open.

Help with simple meta programming
253517 [mario.lopes@] This is a basic question of meta-programming with Ruby, which I'm
+ 253542 [peter@pe er ] ...
+ 253549 [robert.dober] Maybe you would like to have a look at my personal favorite of all

Pointers for Designing UNO Ruby Bridge
253518 [sneha29@gm i] I am interested in designing a bridge between Ruby and UNO. I have
253523 [B.Candler@po] 1. Learn Ruby. Google for plenty of resources.

alias_method code snippet doubt.
253519 [cooldudevams] module Mod
253524 [jan.svitok@g] This is a pattern how to preserve original method that you want to override.
253544 [cooldudevams] Thanks I am now able to understand whats going on, Until now I used to

respond_to? not working for dynamically generated methods
253520 [maurice.glad] It seems #