202505-349421 subjects 202993-203888

maybe I don't understand the .to_a method...
202732 [john.fink@gm] ...
+ 202736 [ruby@ph li .] test2 = test.split(/[\n\r]+/)
| 202745 [john.fink@gm] ...
| + 202748 [tanner.burso] ...
| | 202749 [john.fink@gm] ...
| + 202751 [adam.shelly@] Http requests return a two-element array with the response and the data.
|   202754 [john.fink@gm] ...
+ 202850 [dan-ml@da 42] You are not mistaken; String#to_a returns an array of lines. But you didn't

[RAILS] collection_select
202733 [josselin@wa ] I am using some 'collection_select' combo boxes (w Ajax calls) , it's
202734 [drbrain@se m] Please ask rails questions on the rails mailing list.

String Matching in an Array
202746 [ryan.edwards] I have an array set up that I want to match the user input to a property
202747 [ryan.edwards] Forgot to mention I'm trying to match an 8 digit number, but I pretty
202758 [tom@he me st] irb(main):001:0> val = gets
202775 [ryan.edwards] Most excellent thank you, it's working now, it's always something small
+ 202782 [chris.hulan@] system('cls')
+ 202783 [mvette13@gm ] ...
  202786 [ryan.edwards] Thanks Mark and Chris duely noted.

STR2CSTR? Malloc or not?
202755 [jared.r.rich] I've seen code examples for STR2CSTR that have mallocs and (mostly)
202787 [TimHunter@nc] In 1.8.4, STR2CSTR is marked "obsolete" in ruby.h. The preferred API is

Markaby/Xmlbuilder error - XmlMarkup cannot mix a text argument with a block
202760 [farrel.lifso] I'm not sure if I'm grokking how to use Markaby correctly. I'm trying
+ 202764 [hanklords@gm] mab = Markaby::Builder.new
| 202770 [farrel.lifso] That produces the same error (In digging around in the code it
+ 202769 [ruby-talk@wh] The error is in the template.
  202773 [farrel.lifso] Gah! Thanks why! I knew it was something stupid...

rubynodes extension failed compilation
202762 [the.mindstor] For the first time I am trying to install a Ruby package that has C
202774 [the.mindstor] I got past this problem... it looks like the rubynode distro includes
+ 202791 [the.mindstor] Just to make the story short... I gave up (hey, don't blame me... my
| 202795 [SimonKroeger] At least this one is easy, you have an environment variable
+ 202812 [dbatml@gm .d] The problem seems to be that the 1.8.4 One Click Installer uses Ruby 1.8.4
  + 202822 [the.mindstor] Many thanks for your additional infos.
  | 202833 [drbrain@se m] You may be interested in ParseTree instead.
  + 202863 [ptkwt@ar cn ] I seem to have had a similar problem, but on Linux.  For some reason the
  + 202904 [ml.chibbs@gm] ...

connecting to an oracle database on an hp server
202772 [jctown@nb sy] Well I'm at my wits end...
202777 [chris.hulan@] Found this Rails wiki

Parsing-Newbie question
202785 [ricardo.oroz] Ruby is my first prgramming lenguage.  I know it's a simple question so
+ 202788 [schapht@gm i] I find that each_line is nicer to work with than .gets for these
+ 202805 [w_a_x_man@ya] table = {}
  202825 [ricardo.oroz] Thanks for the help William,
  + 202830 [dblack@wo bl] The /x modifier on the end of William's regex means that literal
  + 202872 [w_a_x_man@ya] Removing the x is like removing the lead from your

passing nil to WSDL function
202793 [raja@ec .g t] Consider the following script: I want to pass nil to 'eventId' instead of 0.
202836 [nakahiro@sa ] Can I see the WSDL and the error message you get?  How it's going when

Passing the name of an argument and then its value
202798 [anne@wj .h r] I have a soap4r created fx to search amazon which has too many
+ 202806 [logancapaldo] I would use a hash, a splat and an array. My solution follows, it
| + 202829 [anne@wj .h r] I don't really want to write the names out! and I want it to be general
| + 202834 [anne@wj .h r] I don't really want to write the names out! and I want it to be general
|   202837 [anne@wj .h r] oups, sorry about the repeat
+ 202813 [anne@wj .h r] Sorry, I was not clear enough, the soap4r fx  is generated by a ruby fx
  203262 [nakahiro@sa ] I don't know what 'fx' means but...

Object#extend inner workings
202817 [tom@he me st] I've got a question regarding the inner workings of extend. Consider the
+ 202818 [collinsj@se ] As I understand it, Ruby adds another "transparent" superclass each time
| 202824 [tom@he me st] But the behavior of the modules is that of a subclass (being able to
| 202827 [collinsj@se ] Oh, right, nevermind.
+ 202826 [dblack@wo bl] No, it's just inserting the modules along the method lookup chain.
  202828 [tom@he me st] Ah! Have I said I love Ruby today?

[ANN] XMPP4R 0.3 released
202819 [stephan@sp c] XMPP4R is a Ruby library for the Jabber/XMPP instant messaging protocol.

IRb History
202832 [james@gr yp ] Watching the other IRb thread, I'm getting the hint that it has a
202848 [logancapaldo] I thought it always had history...you just need to hack it to have

[RoR] problems using own class
202843 [Jonathan.Hei] I just build my own class that looks like this
+ 202861 [drbrain@se m] Rails questions go on the Rails mailing list.
+ 202922 [Jonathan.Hei] I solved this problem with the help of a german RoR forum.
  202928 [frdrch@we .d] www.rubyforen.de is a german Ruby forum not (only) a RoR forum! ;)
  203028 [Jonathan.Hei] a little bit foolish but ...

RCR 331
202851 [transfire@gm] It's the little things that waste my time the most. Another reason to
202916 [leslieviljoe] That's where a little bit of ignorance saved me: I didn't know there was

Looking for a Ruby library to untar a file.
202855 [shalofin@gm ] Does anyone know of a library to untar a file?  I use Zlib to gunzip,
+ 202858 [tjackiw@gm i] Wayne,
| 202893 [shalofin@gm ] Thiago,
+ 202884 [erikveen@gm ] Have a look at tarrubyscript.rb in tar2rubyscript.tar.gz [1].
| 202896 [shalofin@gm ] Erik,
+ 202898 [ mfp@ac .o g] Get it from http://rubyforge.org/frs/?group_id=84 or

how to split an array in sub arrays of the same length
202866 [paolo.bacchi] Is there a way to split an array in sub arrays of the same length, that
+ 202869 [eban@os ri .] % irb --prompt simple
+ 202870 [botp@de mo t] # Is there a way to split an array in sub arrays of the same
+ 202880 [m_goldberg@a] Although you could use Enumerator::each_slice as others have
+ 202907 [paolo.bacchi] thanks to all for responding.
+ 202991 [w_a_x_man@ya] Always remember that a program without inject is a
+ 202992 [gavin@re in ] class Array
| 203040 [logancapaldo] This is in enumerator, enumerator comes with ruby. Do we really need
| 204802 [renard@nc rr] I believe the OP asked how to split an array in "x" sub arrays of equal
| 204808 [renard@nc rr] Sorry, but I pressed the Post message button too soon.
| 204837 [w_a_x_man@ya] class Array
| + 204911 [w_a_x_man@ya] class Array
| + 204917 [renard@nc rr] Yes! it is a much better way !!!
+ 204913 [drnicwilliam] Posted via http://www.ruby-forum.com/.

What's the difference between these two block passing strategies?
202877 [ihatespam@ro] A common complaint I hear about Ruby is (I think, I may quoting
202886 [erikveen@gm ] They are not equivalent. Version A has to convert a block into

Newbie - Q: working with files
202881 [demallien@ma] I have a function with the following code
+ 202912 [schapht@gm i] I would wonder if something's happening in handle_command.  Or maybe
+ 202946 [taitbp@ya oo] Maybe something is going wrong in your handle_command call that makes

return statement where it is usefull ?
202882 [pere.noel@la] i've the habit (from java ;-)) to put a return statement in a method
+ 202885 [rubyforum@co] I think that both cases are usefull: return indicates that you intention
| + 202891 [rubytalk@ea ] ...
| | 202894 [yvonthoraval] ...
| | 202899 [alex@bl ck e] It's the return value of the p method, which happens to be nil in this
| + 202895 [yvonthoraval] ...
+ 202900 [listbox@ju i] Ruby implicitly returns from the last expression in the method, but
| + 202903 [yvonthoraval] ...
| | 202911 [M.B.Smillie@] Well, as long as we're talking about Rubyish, then -1 is probably not
| | 202920 [yvonthoraval] ...
| + 202906 [dblack@wo bl] Definitely (and even "self." can be eliminated) -- also, I would guess
|   202919 [yvonthoraval] ...
+ 202901 [dave.baldwin] As a documentation aid.
+ 202902 [fred@la av .] Emmm, in this precise case, it is - if you don't put your -1 in a else
  + 202905 [yvonthoraval] ...
  + 202908 [simon.kroege] This starts to be off topic, but

Re: Rdoc with hyperlinks
202889 [groups@gr nd] (I assume you mean the actual generated documentation, not the template

202892 [        AN@S] I'm trying to create categories that have their own subcategories, and
+ 202913 [schapht@gm i] [snip: ruby on rails problem]
+ 202921 [james.britt@] Please ask rails questions on the rails mailing list.

Accessing the html objects,if html contains iframes inwatir.
202917 [msrinivasred] I am working with WATIR, My html page contains iframes,

[ANN] simplelog-0.1.2
202923 [jes@lu et nk] Simplelog is the simplest of loggers, built to log when your needs are

[ANN] expanded_date-0.2.0
202925 [jes@lu et nk] Adds extra functionality to the regular Date class.

Weird error when installing yarv on OS X
202937 [ollivier.rob] Am I the only to get this rather weird error when trying to run "make install"
202938 [decoux@mo lo] no,

recursive method and references
202939 [sci000@ph si] I just wanted to realize a small heuristic search algorithm, but it
202975 [hulachr@ho m] Your pos array contains references to other arrays,
203069 [sci000@ph si] Thank you for the answer, I didn???t know that the subarrays in Ruby are

DRb and xinetd / inetd
202944 [evans.jon@gm] I've written a simple DRb service and I'd like to run it under xinetd

[SUMMARY] Negative Sleep (#87)
202945 [james@gr yp ] These invent-your-own definition problems are always funny.  Some of you have

"insecure world writable" fix ?
202947 [sharre@tr ns] I have come up with a fix/workaround which turns off the "insecure world
+ 203005 [Eric.Armstro] *Heck* of a workaround. Thanks. I look forward to
+ 203059 [decoux@mo lo] When ruby find some special characters (like \n;[]{} ...) in the string, it
  203152 [sharre@tr ns] Ok, I understand the reason this works the way it does - Ruby wants the
  203158 [decoux@mo lo] Yes, correct the problem (i.e. change the permission for the directory)
  345333 [qianjigui@gm] As the ts said, setting the $SAFE is a way to ignore the warning.
  345344 [hugh313@gm i] what is the best gui for ruby and where can i find it?
  345348 [karottenreib] there's tons of threads about this, e.g.

*.rb not running on Windows any more
202952 [gavin@re in ] At work, I installed 1.8.2 from the one-click.
202977 [transhumanis] I'm guessing a bit here, but the problem might lie in the Path or
202983 [gavin@re in ] PATHEXT it was, thanks!

Using .each with constructors
202955 [transhumanis] Is there a nice elegant way of creating several named objects of the
+ 202957 [phurley@gm i] I am sure some of the real Ruby hackers will have a better solution,
+ 202959 [james@gr yp ] => ["0", "1", "2", "3"]
+ 202968 [GENIE@pr di ] The parallel assignment/array expansion approach suggested by patrick
| + 202969 [dblack@wo bl] That won't work.  The variables will be local to the eval, and not
| + 202971 [transhumanis] I notice the first two can be combined to
| | + 202979 [james@gr yp ] I was just using the i to produce different Strings so you could see
| | + 202986 [SimonKroeger] The array holds references to the new objects, but the objects don't know
| |   202989 [transhumanis] Now that's elegant. Why would you only use it for immutable types?
| |   202995 [SimonKroeger] No, that's ok for normal objects, but
| + 203009 [GENIE@pr di ] You're right, it works if you do the a=b=c=d=0 line first to init scope
+ 202976 [transfire@gm] require 'facet/enumerable/every
+ 203002 [robert.dober] ...
  203021 [transfire@gm] Hmm...It's too bad that #times below returns 3. It be pretty neat if it
  + 203022 [GENIE@pr di ] The solution i use to this is (1..3).map { Object.new }.  It's
  | 203024 [transfire@gm] Sure. But it does have the additional overhead of creating a Range
  + 203023 [vikkous@gm i] class Proc
  | 203025 [transfire@gm] Nice. I'll use that.
  + 203033 [logancapaldo] irb(main):001:0> RUBY_VERSION

"" vs ''
202958 [bjohnson@co ] ...
+ 202960 [Daniel.Berge] I think this is more or less along the lines of personal preference.
+ 202962 [marcel@ve ni] Aesthetics aside, Ruby optomizes double quoted strings that don't have any
+ 202963 [collinsj@se ] I like to think it makes a difference, but...
+ 202964 [james@gr yp ] '...' goes through processing too, just less.  \' and \\ are special
+ 202997 [jmg3000@gm i] I usually use double quotes since my strings often have apostrophes in 'em.
+ 203091 [dbatml@gm .d] There is no difference at all after parsing, both get turned into a
+ 216316 [dave.m@em il] - It makes the code more aestethic.
  + 216320 [rdm@cf l. om] -  It's less work for the interpreter.
  | 216332 [james@gr yp ] What makes you say this?
  | + 216335 [gavin.kistne] And, FWIW, I did the same thing using a really long string with lots of
  | + 216346 [rdm@cf l. om] If the interpreter sees a single-quoted string, it knows
  | | + 216348 [vjoel@pa h. ] True, but syntax hiliting can help spot the #{...}.
  | | + 217144 [drbrain@se m] Incorrect.  For identical string contents the interpreter does the
  | |   217238 [rdm@cf l. om] I was speaking of the entire ruby executable as the
  | + 216358 [chneukirchen] You really should compare the parse-trees of these before even trying
  | | + 216376 [rick.denatal] Du hast ist recht!
  | | | 216516 [chneukirchen] Drop the "ist".
  | | + 216399 [logancapaldo] % cat strings.rb
  | + 216420 [nobu@ru y- a] It knows that it does need to scan the string always for the
  + 216441 [pbattley@gm ] I often end up typing ' simply because it's an unmodified key on my

Trouble setting LD_LIBRARY_PATH for FastCGI script
202961 [cgansen@gm i] ...
202981 [cminear@se u] I set this in Apache's httpd.conf file, in the <VirtualHost>
202990 [cgansen@gm i] ...

[ANN] Mongoose 0.1.1
202965 [jcribbs@ne p] You can download it from:  http://rubyforge.org/projects/mongoose/
202967 [Daniel.Berge] What does Mongoose mean in terms of the future of KirbyBase?  Is
202970 [jcribbs@ne p] I will continue to support and maintain KirbyBase.  It is pretty mature
+ 202978 [james@gr yp ] Does ?hat mean Mongoose will gain a plain text output, maybe using
| 202985 [cribbsj@oa w] 1).  I will soon add #import and #export methods to the Table class, so
| 202988 [james@gr yp ] Ooo, I really like this option actually.  This way you keep all the
+ 203065 [aglarond@gm ] ...
  203089 [logancapaldo] ...
  203530 [aglarond@gm ] ...

recursion in scripts -- global variables required?
202966 [Eric.Armstro] Is it me, or is it pretty much impossible
202973 [M.B.Smillie@] Well, in this case, if you're using global variables, there's not
203007 [Eric.Armstro] There is no inefficency here. Recursion isn't
+ 203013 [Eric.Armstro] Doh! "while true" makes a lot more sense than
+ 203015 [collinsj@se ] It doesn't, sadly. Soon, hopefully.
| 203276 [Eric.Armstro] Good to know. Thanks for the info.
+ 203026 [sean.ohalpin] It doesn't - you'd quickly run out of stack space.
  203032 [Eric.Armstro] I must be going out of my mind. I can't
  203050 [gwtmp01@ma .] Be careful here.  The top-level scope in Ruby is not the same thing
  203277 [Eric.Armstro] That's IT. That's precisely what confuses me. The same

Can't debug with Ruby in Steel...
202984 [ihatespam@ro] Two points...
+ 202996 [huw@DE TH SB] Breakpoints are available for Ruby programs (not for Rails). You simply
| 203047 [ihatespam@ro] I tried that but those functions are disabled.  All I can do is press
| + 203055 [leslieviljoe] On 7/21/06, Just Another Victim of the Ambient Morality
| + 203064 [huw@DE TH SB] It sounds as though you haven't installed the file projectaggregator2.msi.
+ 215138 [george_m6002] I had the same problem and after some hard hours i realized where was