370321-372577 subjects 370723-372384

^ listing out available variables in an ERB template
370519 [mgerstenblat] Suppose I have a Ruby ERB template named **my_template.html.erb**, and it
370525 [josh.cheek g] Ruby has some reflexive methods you can use.

^ Contributing to a gem on github
370531 [josh.cheek g] doesn't work on 1.9.2 since they removed "." from the path (extremely
+ 370533 [huard.elise ] out of curiosity (google won't tell me, and probably missed that
| + 370534 [huard.elise ] or rather, require all the necessary files from the one loaded when
| + 370537 [josh.cheek g] Thanks, Elise. I had tried placing that at the top of my Rakefile, and it
+ 370539 [usenet istik] You should _not_ use this fix, at least not for a public gem (as you are not

^ new file arrivals into a specific directory / folder
370540 [dglnz2 gmail] greetings one and all,
+ 370558 [perl2ruby gm] One implementation that may work is to use a currency file (a hidden
+ 370562 [wishdev gmai] Morning Dave,
  370687 [dglnz2 gmail] many thanks for the heads up think this was what I had read or was it in

^ error message, undefined method in Set
370546 [iainspeed gm] @@available_classes << file unless @@available_classes.include? file
370549 [b.candler po] puts Set.to_s   # does this show "Set" or "Foo::Set" ?
+ 370550 [shortcutter ] Would be my guess as well.  I would rather try this to get an idea of
+ 370588 [iainspeed gm] It shows Set
  370604 [b.candler po] Then at the top of choice.rb I'd put require 'set'.
  370633 [iainspeed gm] That's what I was originally doing, but a lot of the advice I've read on =
  370641 [b.candler po] Personally I don't support that advice, but it's very much a matter of
  370716 [shortcutter ] +1

^ Segmentation Fault; more info?
370553 [ralphs dos32] I am getting a segmentation fault.
+ 370554 [jstewart fus] You'll have to get a core dump and examine it with gdb. A quick google
+ 370555 [luislavena g] Along the segmentation fault you should be seen the backtrace of it.
  370566 [ralphs dos32] Luis,
  370567 [cremes.devli] You haven't provided any useful information for us to help you (platform, ruby version, code example that causes the crash, etc), but I'm going to try again anyway.
  370568 [ralphs dos32] Chuck,
  + 370569 [cremes.devli] Ah, there might still be a way...
  | 370570 [cremes.devli] I just checked and it doesn't look like the devkit install includes gdb. :(
  + 370576 [luislavena g] g the problem down is not an option.

^ passing single backslash character as commang line argument
370561 [kashyap.ivat] I am trying to pass a string as a command line argument to another ruby
+ 370563 [b.candler po] That depends.
| 370587 [kashyap.ivat] Brian,
| + 370601 [b.candler po] Windows is broken in so many ways, I can only guess this is one of them.
| | 370655 [jeremy bopp.] I took a swing at this under Windows using both the native build of Ruby
| + 370660 [luislavena g] One important thing to mention is that multiple arguments with
+ 370659 [luislavena g] Please include which version of Ruby are you using.

^ Re: Check if directory exists
370573 [picklepumper] Agreed, I got here from a Google search as well. It amazes me people say

^ copying a matrix.
370574 [edvelez.g gm] How can I create an array copy that
+ 370575 [perl2ruby gm] m2 =3D m.dup
| 370581 [mentionuse g] Perhaps
| 370584 [edvelez.g gm] Thank you both. It's nice to have a one line object copy.. I never
+ 370602 [b.candler po] m2 = m.map { |e| e.dup }
  370630 [colinb2r goo] m = [ "a", nil, true, false, 1, 2.0 ]

^ interpreter cannot enter in the context from another thread.
370577 [ralphs dos32] "Please note that Ruby 1.8.x is not multithread and that the
370578 [luislavena g] t according to Dave Thomas (pg. 171 in *Programming Ruby 1.9*)
370579 [ralphs dos32] Luis,
370580 [cremes.devli] A native thread (e.g. one created by the FXRuby C extension) cannot call back into the ruby runtime context to execute more ruby code without causing lots of pain.

^ [ANN] pluginfactory 1.0.7
370582 [ged FaerieMU] Version 1.0.7 of pluginfactory has been released.

^ General purpose TCP proxy?
370583 [markus fisch] I'm trying to figure out if there's a gem or software available in Ruby
370586 [wishdev gmai] Afternoon Markus,
370605 [markus fisch] This one looks very promising based on the slides and the documentation.
+ 370610 [no spam.plea] <http://github.com/cjheath/loggingproxy>
| 370618 [gethemant gm] Whats wrong with haproxy ?
| + 370619 [gethemant gm] And sorry for top posting.
| | 370657 [tony.arcieri] Don't apologize, the anti-top posting nazis need to learn TIMTOWTDI some day
| + 370656 [markus fisch] I don't know .. does it allow my to have per Client connection logic and
+ 370678 [wishdev gmai] I would chalk it up to probably just a mistake in the sample code - yes,

^ ActiveRecord > MySQL > undefined method `more_results'
370585 [andrew.kirk ] I am attempting to use ActiveRecord within a script I am writing to
370634 [rogerpack200] I would step through where this call is *working* in development, see

^ TCP Socket: Connection reset, but Select says it's valid
370589 [wsc imagexpe] I'm running a server that sometimes encounters a
370600 [b.candler po] Your code prints the exception class and message, what do you see?
370631 [wsc imagexpe] Thanks for responding. I would expect to get some kind of EOF error on
370645 [b.candler po] Yep, it's not a simple EOF - the far end has sent a TCP RST instead of a

^ Point me to help w/ multithreading in 1.9.2-p0
370590 [astahl hi5.c] a load testing gem.  Unfortunately, didn't see much response from that
370593 [astahl hi5.c] Nevermind... figured it out.
370606 [markus fisch] Mind to share?
370613 [astahl hi5.c] No prob... but I'm not sure it's quite what you're looking for.  I'm
+ 370639 [normalperson] Are you opening multiple file descriptors per thread?  If you exceed
| 370694 [astahl hi5.c] Thanks for the note, Eric.  Each thread is only opening one file
+ 370717 [shortcutter ] Without going into too much detail I believe one flaw of your design
  370954 [vikkous gmai] I agree that in general it's better to do this kind of thing using the
  370987 [shortcutter ] Absolutely agree.  But since 1.9.2 is pretty fresh I'd expect the more
  370995 [vikkous gmai] Oh, you are right. The boolean variable start prevents the case I was
  370998 [shortcutter ] The access to the cond var in the synchronize block was also the first

^ Operator Overload
370591 [trevor.hines] Hey guys,
+ 370596 [perl2ruby gm] I think you have just defined the class called Overloading and have
| 370597 [trevor.hines] Well, the problem is it isn't doing what I want it to.
| 370598 [jeremy bopp.] You're trying to treat minus as the unary version of the operator, but
+ 370599 [echristopher] First, you're not defining the + method -- you're defining -.
+ 370757 [shortcutter ] Kind regards
  370860 [adrfer yahoo] Robert, I get the point. However it's important to notice that there's no such
  370863 [shortcutter ] Please do not top post.

^ Space Ship Operator <=> Odd Behaviour
370592 [nathanial.al] I have come across a strange occurance when I use the space ship
+ 370595 [perl2ruby gm] On Sep 27, 10:13=A0pm, Nathanial Allan <nathanial.al...@gmail.com>
+ 370607 [stefano.croc] What kind of object are you using  to represent percentages? From the way you
  370758 [shortcutter ] irb(main):001:0> '123%'.to_i

^ RubyConf Ticket Available
370594 [milesf gmail] I have 1 RubyConf ticket available http://rubyconf.org/
372691 [jmewhort gma] Have you sold your RubyConf ticket yet?
373086 [jamie dang.c] John, I've got one if you're still interested.

^ 3x3 Array of int, changing one value affects others
370608 [shaolinog ho] ruby-1.9.2-head > a = Array.new(3, Array.new(3, 0))
+ 370611 [jgabrielygal] That constructor of Array takes the second argument, and places it
+ 370612 [stefano.croc] Array.new(size, obj) doesn't work the way you think. It creates an array with

^ Re: interpreter cannot enter in the context from another thread. (FXRuby)
370609 [ralphs dos32] Chuck,
370623 [luislavena g] We are more because you're not showing us what code is generating the

^ retrieve the username
370614 [arihan_sinha] Dear All,
370616 [peterhickman] On a mac running OS X the username is in ENV['USER']
370617 [arihan_sinha] Cheers Peter. Thanks

^ location of browser cache in mac for safari, chrome,firefox
370615 [arihan_sinha] Dear All,
+ 370620 [b.candler po] And the way this has something to do with ruby is ...?
| 370621 [arihan_sinha] I wanted to delete the cache through ruby. Anyway I've done my own.
| 370622 [mentionuse g] Since the question has been brought up, it might be worth giving your
+ 370624 [phasis gmail] In my Mac OS X 10.6.4,

^ Ruby Work
370625 [alvaro_berna] Ruby, and I was hoping you could get me some information. Anything
+ 370626 [seanh1313 tx] Let me take a little stab at the first one (Ruby's main uses as a code lang=
+ 370627 [usenet istik] I am not interesting in doing your homework.
| + 370629 [alvaro_berna] I never asked that you do my homework, I'm asking people who actually
| + 370637 [feaelin keme] ith
|   370684 [usenet istik] I confess I may have overreacted. What triggered me was not the content of
|   370691 [josh.cheek g] Its hard enough being new as is, there is just so much information, and so
+ 370628 [robert.dober] Ruby Quiz seems a good idea for this
+ 370681 [josh.cheek g] Rails, because you can install Ruby on your server, your clients don't need
| 370709 [steve stevek] You are correct, it does.
+ 370710 [sandor.szuec] - webapps with frameworks like rails, sinatra, ...
  370743 [alvaro_berna] Ruby Work
  370760 [usenet istik] Sorry about my former rough response, I wish you all the best for your

^ [ANN] JRuby 1.5.3 Released
370638 [tom.enebo gm] The JRuby community is pleased to announce the release of JRuby 1.5.3.

^ puts and return
370640 [jhaungs gmai] 10.times do |i|
+ 370642 [wyhaines gma] && is what you want, to get that effect.
| 370644 [rick.denatal] No that doesn't work, since puts returns nil and nil || whatever
| + 370647 [jhaungs gmai] Yep. This is pretty much where I went with it, too.  Pragmatic trumps
| + 370648 [b.candler po] puts("Too big" || break) if i > 5
|   370650 [jhaungs gmai] Digging deeper into the ruby syntax, it does not appear that there are
+ 370643 [rick.denatal] No, the only difference between && and 'and' is their parsing precedence.
| + 370646 [jhaungs gmai] Interesting. Thanks.
| | + 370651 [b.candler po] Presumably that's in someone else's Rails application, not in Rails
| | + 370654 [rick.denatal] Because it was the recommended way to get around 'double render'
| + 370649 [wyhaines gma] Ah, yeah. && results in the break, but not the puts.  You are right.
| + 370667 [Ruby GoogleM] I use it sometimes for control flow in DSL-ish situations. Here's a
|   370670 [kredaxx gmai] The reason it doesn't work as you expect is because 'and' and puts.
+ 370652 [brabuhr gmai] 10.times do |i|

^ Wanted: AI tutorial
370658 [andre_olsson] Artificial Intelligence to a game. im pretty new to programming, so
370662 [feaelin keme] AI, even constrained to the techniques used in game programming is a
370664 [thiagown gma] That's a BIG area, that's like asking how to machines lol.

^ Color sequences in ri on Windows
370661 [echristopher] After installing some gems, the system recommended that I refresh ri
+ 370663 [luislavena g] On Sep 28, 8:14=A0pm, Eric Christopherson <echristopher...@gmail.com>
| 370666 [echristopher] =E2=86=90[0m=E2=86=90[1;32mKernel.system=E2=86=90[m
| + 370680 [luislavena g] On Sep 28, 9:09=C2=A0pm, Eric Christopherson <echristopher...@gmail.com>
| | 370688 [echristopher] Oh, is that what that folder contains. I have been (kind of stupidly)
| + 370791 [rogerpack200] ri doesn't have a "--no-color" option?
|   + 370799 [echristopher] hem.
|   | + 370812 [luislavena g] On Sep 30, 4:43=A0pm, Eric Christopherson <echristopher...@gmail.com>
|   | + 370865 [rogerpack200] It might work.
|   + 371086 [echristopher] hem.
+ 373588 [rogerpack200] Posted via http://www.ruby-forum.com/.

^ Can raspell create a dictionary?
370665 [plynchnlm gm] I'm just starting to use raspell, and it looks like it might be just

^ Calling a method in the context of a specific thread
370671 [ralphs dos32] I am writing an FXRuby program.  My question should be independent of FXRuby, though.
370756 [shortcutter ] 6) Have a task queue which is read in the main thread.  You can even
370769 [ralphs dos32] Robert,
370771 [shortcutter ] FXRuby, though.

^ Free to use and zo cost Ruby book
370673 [mindaslab gm] Please enjoy the book, give feedback, if you can buy it to support my
370901 [devguy.ca gm] "I Love Ruby Long Time" ;-)
370939 [iscrobertogo] Great, nice add!!
371013 [mindaslab gm] Ya working on it. There are lots of mistakes in the first one. You can

^ Error - "`+': can't convert nil into String"
370677 [prpaulroche ] Why does the code below give me this error? What can I do to fix it?
+ 370679 [luislavena g] Either @fname or @lname are nil
+ 370685 [jgabrielygal] @fname is nil, and you are trying to call the + method on it. Hence the error.
+ 370686 [blazeroot gm] Then nil would be an empty string.

^ unknown regexp options
370690 [garyrut gmai] When I try to "require", "load" or use rdoc on a .rb file in IRB I get
370692 [stefano.croc] I don't have a mac, so I'm guessing. Have you perhaps a .irbrc file in your
370699 [garyrut gmai] Thanks for you help Stefano!
+ 370701 [b.candler po] Can you show *exactly* what you type, and exactly what response you get?
+ 370702 [alexg rugged] You need to post your full irb session and the file you are trying to
  370703 [garyrut gmai] puts "test"
  + 370704 [stefano.croc] load '/Users/gary/Desktop/test.rb'
  + 370705 [Rob AgileCon] load "/Users/gary/Desktop/test.rb"
    370858 [garyrut gmai] Ah, You're dead right there. Works perfectly now!

^ ActiveRecord Mixing Conditions + Better Way to Write This
370693 [meetme2meat ] Is There A better Way to Write this
+ 370720 [josh.cheek g] Rails list (looks like you're posting from ruby-forum.com, you can access
+ 370725 [b.candler po] Beware relative precedence of AND and OR. It's possible AND binds more

^ Seeking sponsors to fly me to RubyConf
370695 [eleanor game] UK-based full-time open source developer =
+ 370700 [rick.denatal] ins.net) on a very restricted budget is booked to speak at RubyConf about t=
| 370707 [eleanor game] (http://golightly.games-with-brains.net) on a very restricted budget is =
+ 370713 [rogerpack200] start a pledgie?
  370785 [eleanor game] Looks like that might be the way to go. Well, either that or bank robbery lol
  370824 [eleanor game] back=20

^ method_missing
370696 [seye69 gmail] retrieve columns values from result rows. It seems however that some methods
370697 [jgabrielygal] Are you talking about Ruby/DBI?
370698 [seye69 gmail] ahh interesting - i'll look into that, thanks - my first attempt
370706 [seye69 gmail] Thanks Jes=FAs, the following seems to work

^ Ruby 1.9.2: /\w/u does not match umlauts ("")
370708 [x-ruby-lang ] I found that, unlike Ruby 1.8, the word character class in Ruby 1.9
+ 370711 [x-ruby-lang ] After some more googleing I found this bug report (don't know why I
+ 370712 [rogerpack200] so it's intended, however if you extremely dislike this, then complain
  370714 [x-ruby-lang ] "Basically at a certain patch level of 1.9.1, \w was set to no longer
  370732 [rogerpack200] yeah.  1.9.1 behaving differently with a different *patch level* is less

^ Re: Metadata 0.5
370715 [dandante dan] These links don't work. Is there somewhere else I can find this project?

^ Ruby on web
370718 [jgnmello gma] When I use rubt on web I need to put '#!/usr/bin/ruby' in header, if
370719 [plynchnlm gm] I'm not sure if I've understood your question, but if you are asking
370894 [jgnmello gma] Yes, if I change the place where I execute ruby, the path maybe be
370906 [josh.cheek g] 2010/10/1 Jo=E3o Mello <jgnmello@gmail.com>
370930 [jgnmello gma] I know it's appear confusing, but when I use in my computer (Windows

^ The beauty of Ruby through examples
370721 [adrfer yahoo] Hey all,
+ 370722 [jude.dashiel] I take it rand() gets pseudorandom numbers from computer and as such
| 370781 [regis.aubare] require 'thread'
+ 370724 [b.candler po] For wow factor, I think you can't beat a 4-line webserver written in
| 370726 [petite.abeil] What about a one-line HTTP server written in Lua? :P
| 370751 [botpena gmai] yes, it's a one-liner, but, you'll have to _read_ it many times..
+ 370727 [fred lacave.] File.open("script.rb") do |fichier|
| + 370729 [joelvanderwe] puts `grep -i ruby script.rb`
| | + 370731 [b.candler po] I guess you should show irb explicitly.
| | + 370761 [fred lacave.] Yep, nice addition !
| + 370762 [fred lacave.] def factorial(n)
|   + 370763 [robert.dober] You see, that depends, it is more readanble to me. Probably totally
|   + 370764 [botpena gmai] lose the 1.
|     370765 [eregontp gma] Except if you want factorial of 0 to be right.
|     370767 [botpena gmai] my bad. i must review my math now :)
+ 370784 [regis.aubare] def printTree(tree,indent)
| 370826 [joelvanderwe] class Object
| 370846 [john.sikora ] How about some more simple ones like
| 370929 [w_a_x_man ya] [125, 450, 250, 1000, 675].sort.reverse.map{|e| "$#{e}"}[0,3]
| 370951 [mentionuse g] I would go with #first, since it's somewhat more readable.
+ 370849 [leslieviljoe] Wow, these are fantastic, especially this last one. I don't know if
+ 370933 [w_a_x_man ya] the
| 370937 [Rob AgileCon] => [15, 11, 20, 10, 9, 18, 13, 19, 16, 17, 14, 12]
+ 370970 [maurice.diam] I've been collecting some from around the internet, but i'd
| 370983 [mentionuse g] This site seems to have a few stylistic problems, as far as common
| 371040 [maurice.diam] I agree!
| 371074 [mentionuse g] Yes, I agree. Sorry, I wasn't objecting to what you said directly, as
| 371236 [cidza tin.it] find the first gap in array of fixnum values
| 371253 [mentionuse g] I don't see this as much of a good use of inject, to be honest.
+ 372160 [eregontp gma] So am I, I will give a lightning talk about Ruby in a week.
| 372194 [josh.cheek g] If you're on OSX, I think this makes for a great example, though I usually
| 372564 [eregontp gma] Seems cool, I tried a little, and found my screen full of Tweets !
+ 372870 [josh.cheek g] I presented about Ruby last night to my school for the ACM at my school, had