276665-408426

276450-352028 subjects 276846-279082

Check if a parameter is a constant or an object?
276665 [forum@jo h. ] def some_method(arg)
+ 276714 [linkin.dev@g] ...
+ 276715 [dblack@ru yp] X = "hi"

defining methods dynamically
276666 [bagam_venkat] I have an array has_roles = %w[admin employee ...] which is a subset of
+ 276695 [globyy3000@h] If I'm understanding you right...
+ 276739 [olsonas@gm i] class Application
| 277349 [bagam_venkat] illustration.
+ 277369 [ravwar@gm il] method_missing - is awfully slow, so if there is other option (like two

Ruby DTrace (on OSX Leopard)
276676 [a2800276@gm ] Has anyone had any luck getting it to run?
+ 276687 [a2800276@gm ] Preliminary experiments show that I need to hook dtrace up with a
| 406850 [lists@ru y- ] Is there any way of making
+ 408426 [lists@ru y- ] I was able to run it by referring to

rejectconf at RubyConf this year?
276679 [rsanheim@gm ] Are there any plans for a reject conf at this year's Ruby Conf?  Maybe
277016 [drbrain@se m] RejectConf isn't planned.  Possibly Saturday, though.

loop until a key (i.e. enter or ESC) is pressed
276680 [wurzelciderm] I'm very new to Ruby (3 days).
276697 [tim.pease@gm] You will need to run your loopy method in a separate thread, and then
276703 [wurzelciderm] That does work properly.
276705 [ara.t.howard] start this before you fire up your socket stuff
276707 [wurzelciderm] thanks for your response but I struggling to implement it.
276713 [ara.t.howard] exit
276719 [wurzelciderm] thanks...but...
276748 [ara.t.howard] you can't easily multi-plex io on windows with ruby.  search the
277282 [dan@ze aw b.] Another possible approach is to use trap to catch the TERM or INT

InstantRails windows Installation, problem with Gem
276682 [rondsouza200] I downloaded and installed the Instant Rails 1.7 from the website
+ 276720 [mo_mail@on h] use_ruby.cmd that should be run from your console before you use
+ 276723 [rogerpack200] make sure gems/sources-x-x directory exists
  276757 [rondsouza200] Thanks for your response

Array and ASCII Help needed...
276686 [hiato3@gm il] ...
+ 276698 [globyy3000@h] anything after the '?' returns an ascii value, ie  ?1 returns the ascii
| 276744 [hiato3@gm il] ...
+ 276749 [martindemell] @n = @l[0]
  + 276762 [hiato3@gm il] ...
  + 276778 [bbxx789_05ss] h = Hash.new('hi')
    + 276780 [mental@ry ia] Actually, yes.  They give the same results.  Try it yourself...
    | + 276787 [ara.t.howard] good thing too - or i'd have a LOT of code to fix ;-)
    | + 276830 [botp@de mo t] # >> a ||= b is a common ruby idiom for "set a to b only if it isn't
    |   276923 [martindemell] Oh, good point. I want to call that a bug, but I can't quite put my
    + 276782 [martindemell] Yes, and IRB confirms it (ruby 1.8.6). AFAIK, all the a o= b operators
    | 276907 [sepp2k@go gl] Not in this case. Try p h instead of puts h['a'] above and you'll see
    + 276783 [martindemell] I did oversimplify this bit, I'll admit - to be precise, due to the

Link to us
276688 [rajat79@gm i] I am trying to have a module on each of the pages of my website, where
276726 [stas@Fr eB D] This depends on how you implemented your site architecture. Ruby knows

[ANN] One-Click Ruby Installer 186-26 Release Candidate 2
276694 [ml.chibbs@gm] This is the 2nd Release Candidate for Ruby 1.8.6-p111 by

Performance: system() vs. Garbage Collection or Thread Count
276706 [peterlaurens] I use a Ruby script to run a Java stress-test tool (JMeter) using
276772 [mortee.lists] I can't help you with your actual problem, but you should take a look at

RUBY DRY to replace 6 lines in 1
276710 [josselin@wa ] zl = 9 if farthest_proposition.distance_to(origin) < = 25.0
+ 276729 [sebastian.pr] Couldn't you write something like this?
| 276740 [josselin@wa ] thanks a lot..  when trying to get DRY,  I just wonder if it helps in
| 276750 [mental@ry ia] I'd be more concerned with the multiple calls to #distance_to in the
| 276858 [josselin@wa ] yes, wich is not the case with GoogleMaps ;-))
+ 276737 [jmrepetti@gm] ...
+ 276741 [konrad@ty er] charset="iso-8859-1"
| 276857 [josselin@wa ] thanks a lot, I'll test it in my perf bench against other ways
+ 276742 [martindemell] s = farthest_proposition.distance_to(origin)
| 276743 [martindemell] oops, that should be break z, of course, not break [z,d]
+ 276747 [mental@ry ia] FWIW, one line isn't necessarily a realistic goal; DRY doesn't always
  + 276752 [mental@ry ia] (The exception being when it is clearly part of a word, like zoom_level.)
  + 276754 [konrad@ty er] charset="utf-8"
  | 276756 [mental@ry ia] This is very true, but there are plenty of situations where you can't
  | 276815 [konrad@ty er] charset="utf-8"
  + 276802 [josselin@wa ] mind when coding.. I learned Ruby (because of Rails...)  on my personal
    276803 [mental@ry ia] Ah, I just noticed a bug here in my code.  This should be

Re: the result of Ruby official logo contest
276718 [transfire@gm] You know all it really needs is for the background to be lighter and
276786 [promos@bu ch] Congrats Tom!
276818 [shevegen@li ] I just looked at the Python logo
276821 [gerardo.sant] It's funny that you didn't mention Perl, or PHP.
+ 276837 [phrogz@ma .c] I'm saddened by the outpouring of criticism that this logo has
| + 276839 [phrogz@ma .c] Here are a few more thoughts, that I posted as a comment on the Ruby
| + 276850 [botp@de mo t] # 5) I hope that this can be an open, iterative process. I don't think
+ 276838 [znmeb@ce ma ] Well ... there's the PostgreSQL elephant and the MySQL dolphin. As far
+ 276840 [halostatue@g] On 10/30/07, Gerardo Santana G=F3mez Garrido <gerardo.santana@gmail.com> wr=
  + 276841 [phrogz@ma .c] It seems to me that you are implying that a good logo should cater to
  | 276845 [dangerwillro] Oh, it doesn't really matter!
  | 276900 [promos@bu ch] This reminds me a local Mexican Food resturaunt, "El Patio".   It has a
  | 276987 [evangelino.v] I think the selected submission does not fulfill the purposes of the
  | 277067 [botpena@gm i] this is fine. just remove the text and the sparkles (the sparkles look
  | 277068 [botpena@gm i] btw, mind if i copy it? you wont need it anymore since the contest is
  | 277262 [evangelino.v] Sure,
  + 276851 [botp@de mo t] # On 10/30/07, Gerardo Santana G=F3mez Garrido=20
    276852 [axgles@gm il] Me too.I like the image part of the new logo too.And,may be see

Experiences with Exerb?
276724 [luislavena@g] I'm dropping this here since there isn't too much information about
276735 [jftucker@gm ] I've had good experiences with small apps and exerb, a couple had extensions and strange require semantics, and exerb (mkexy) managed reasonably well.

gmane missed a time period?
276732 [mortee.lists] Are there other people here who use gmane.org to read this list? Has
276736 [james@gr yp ] If gmane wraps the Usenet group comp.lang.ruby, that may have been
276751 [mortee.lists] No, it seems to track the mailing list itself - I guess most of gmane

PostgreSQL-Ruby extention: calling Postgres functions
276733 [a.cipriani@g] I'm using the Postgres-ruby extention to connect to my Postgres db
276761 [person@ea th] not sure how it is done with raw postgres driver (is it the exec()

The return of the son of Umlaute
276734 [wolf.rainer@] I'd like to get a hint about a little Ruby problem I'm dealing with.
+ 276798 [mortee.lists] This has just been discussed today. You have to use the same charset
+ 276809 [bbxx789_05ss] Welcome to unicode hell.  By the way, there is a third ring: in order to
  277061 [wolf.rainer@] Thank you for your comments, mortee and 7stud.
  277072 [ed.odanow@wo] Please don't forget in addition, that Windows uses two different
  277073 [ed.odanow@wo] Take a look to http://www.gnu.org/software/libiconv/
  277450 [wolf.rainer@] thank you very much, the second line above did the trick, and it works

Re: Ruby Changes in Leopard
276745 [doodpants@ma] On Oct 30, 10:10 am, "Laurent Sansonetti"

Problems with mechanize and fields embedded in tables
276753 [tjacobs-sndr] ruby			1.8.2
+ 276774 [tjacobs-sndr] require 'mechanize'
| 276784 [bbxx789_05ss] It sounds like javascript may be adding the fields you want.  When you
| + 276847 [tjacobs-sndr] Nope. You can see the fields in lynx, so it's definitely not
| + 276859 [devi.webmast] Every browser will let you turn off JavaScript, that's the easy way to
+ 276777 [tjacobs-sndr] carbon = WWW::Mechanize::RadioButton.new('SEEKER_CC', nil, true, reply_form)

[OT] logo
276763 [vjoel@pa h. ] Doesn't logo already more or less include a lisp interpreter?
+ 276764 [martindemell] touche!
+ 276932 [perrin@ap th] I tend to guess that's a joke -- but if you're serious, I'd like to know
  276942 [vjoel@pa h. ] Sorry to disappoint you.... it's a terrible joke. :)
  + 277005 [dangerwillro] is that Enumerabl#buttfirst ?
  | 277033 [vjoel@pa h. ] And don't forget Enumerable#butthead, which returns an array consisting
  | 277036 [dangerwillro] Nice one. But maybe it would simply return the username of the
  + 277204 [perrin@ap th] Darn.  I thought it was a pretty *good* joke, if you were serious.  More
    + 277206 [dangerwillro] It would be useful, but the juvenile humor would probably be forever.
    + 277277 [martindemell] I thought it was a brilliant multiple pun, irrespective of its seriousness :)
      277286 [perrin@ap th] Good to know I'm not the only one who thought so.

Looking for a conf ticket....
276765 [james@im je ] ...

Bounty: $250 - Successfully log in to AOL Webmail with Mechanize
276767 [dave.myron@c] We're about to release a gem called Blackbook that will automate
+ 276869 [peter@ru yr ] Do you *absolutely* need mechanize?
| 276948 [dave.myron@c] It's helpful and the other completed importers (Gmail, Yahoo, Hotmail)
+ 277008 [mortee.lists] I think I have it figured it out. I have a script that can log you into
  277030 [dave.myron@c] If you want to send it directly to me, that's fine. Also feel free to
  277116 [mortee.lists] I've sent a private mail to you; have you received it?...
  277166 [dave.myron@c] You're the man, Marton! Consider the bounty won!
  277436 [mortee.lists] Something like that. Thanks if you let him know, then I won't have to.

Re: InstantRails for win, Gem::RemoteFetcher::FetchError
276768 [rondsouza200] Re-installed Rails and am getting new error as mentioned in item 3
+ 276769 [rogerpack200] Try running it several times--that usually means a poor connection or
+ 276929 [rondsouza200] I ran the command several times.
  276930 [mo_mail@on h] Are you behind a proxy?
  276950 [rondsouza200] I am installing this at work place
  + 276955 [rogerpack200] google for 'gem proxy'
  + 276956 [rondsouza200] undefined method `[]=' for #<Gem::ConfigFile:0x2bc92cc>
  | 276958 [rogerpack200] run gem help
  + 277106 [rondsouza200] gem list -r --backtrace -p 'http://proxy:80'
    277107 [rogerpack200] I wonder if you could fix it by downloading rubygems again (from its
    277108 [rondsouza200] Will do that.

Code to DRY
276773 [michel@de az] This is a simplified version of the problem I have. I work with
276779 [martindemell] module Ordered
+ 276813 [konrad@ty er] charset="iso-8859-1"
| 276864 [michel@de az] #< looks good. Thanks.
| 276872 [shortcutter@] Also keep attention to module Comparable
| 276874 [michel@de az] Robert,
| 276885 [shortcutter@] for
| 276903 [michel@de az] No, I only use it to find, if any, a "piece of knowledge" b with
+ 276863 [michel@de az] Thanks Martin, clean and simple.

better way to accumulate totals
276776 [rlkeller@ya ] ...
+ 276781 [ara.t.howard] count = Hash.new{|h,k| h.update k => Hash.new{|h,k| h.update k => 0}}
| 276790 [vjoel@pa h. ] This works...
| 276792 [ara.t.howard] oh yeah, of course ;-)  i'm in the habbit of using 'update' from
| 276793 [vjoel@pa h. ] ...but only if returning the hash is the right thing to do. In this
+ 276794 [bbxx789_05ss] #Create a hash, so that when you use a
| 276814 [rlkeller@ya ] ...
+ 276870 [shortcutter@] Statistics = Struct.new :count, :sum

Re: Performance: system() vs. Garbage Collection or Thread C
276785 [peterlaurens] Thanks - I disabled the GC for the duration of the system() task (the
276788 [gwtmp01@ma .] Kernel.system forks and execs a new process for the command (via the
276789 [peterlaurens] That's excellent info, thankyou. It will help a lot in what I choose to

Is there a usenet library for Ruby?
276796 [ihatespam@ho] Is there a Ruby library to communicate with a usenet server?  I did a
276797 [james@gr yp ] On Oct 30, 2007, at 5:30 PM, Just Another Victim of the Ambient
276800 [fred@la av .] And my very own Net::NNTP library, made to interact with the feeding

Why, oh, why, little regexp?
276801 [rabbitblue@g] 'cost * tax'.match(/([a-z]+)*/).to_a
+ 276804 [vjoel@pa h. ] 'cost * tax'.scan(/\w+/)
| 276805 [rabbitblue@g] How do you people do that? The last time I had a regexp question someone
| 276811 [diegoslice@g] "Mastering Regular Expressions" by Jeffrey Friedl. I haven't seen the
+ 276806 [stas@Fr eB D] Well, the regexp always matches the longest possible string.
| 276807 [rabbitblue@g] Hmm... if what you say is true, why does the second poster's solution
+ 276822 [bbxx789_05ss] pattern = /x.x/
  276836 [rabbitblue@g] That's clever use of ?a, which I recognize but have never seen anyone
  276844 [phrogz@ma .c] My current favorite use for the ?x syntax is converting single-
  + 276848 [lojicdotcom@] Yeah, so you can squeeze Ruby code into small places :)
  | 276879 [rick.denatal] Except under the upcoming revision (1.9) of the (Ruby) Rules of Golf,
  | 276902 [lojicdotcom@] Well, then the least they can do is add Integer#to as an alias for
  + 276888 [bbxx789_05ss] "8675309".each_byte{|code| puts code.chr}
    276890 [james@gr yp ] Printed content aside, it's not equivalent.  The original code is
    276935 [bbxx789_05ss] Whoops.

Ruby Logo
276812 [dangerwillro] Cheer up Matz!
+ 276878 [victor.reyes] ...
| 276881 [lloyd@2l ve ] Eye of the beholder.
+ 276883 [fox@ns l. su] I know.. let's fork the language so we can have a better logo!!

Newbie Question on Operator Precedence?
276816 [zoater@gm il] ...
+ 276825 [shuaib.zahda] for the if statement it gets evaluated so it is true and "then" is
+ 276826 [bbxx789_05ss] (puts false) or true

(BitTorrent-related) binary "string" to hexadecimal?
276819 [shanti@br fo] Let's say one were "hypothetically", and that's a big hypothetical
276824 [shanti@br fo] Ok in case anyone is curious, this seems to work...
+ 276827 [josh.bassett] A "hex nibble" is half a byte represented in hexadecimal. In other
+ 276829 [konrad@ty er] charset="utf-8"

Re: Bounty: $250 - Successfully log in to AOL Webmail with M
276820 [shanti@br fo] I don't think I can help you re: Mechanize and AOL Webmail (at the
276940 [dave.myron@c] We hadn't - and looking now I'm not sure how we missed it. We're doing
276989 [konrad@ty er] charset="iso-8859-1"
277006 [yermej@gm il] This line

Rubyconf Attendees
276831 [rick.denatal] Just wondering how many other regulars of ruby-talk will be in
+ 276833 [pergesu@gm i] I'm not a regular but I'll be there.  Super excited :)
+ 276842 [charles.nutt] I'll be there.
+ 276843 [jeremymcanal] I plan on attending. :)
+ 276849 [james.britt@] I'll be there.   Getting in late Thursday afternoon.
| + 276873 [dblack@ru yp] I'll be there -- arriving late Thursday morning.
| | + 276880 [anthonyeden@] I'll be there. Arriving Thursday night.
| | + 276886 [bplummer@za ] Me to, me to...  As far as arriving, "been here all my life, want to
| + 276884 [kero@ch ll .] Sometime Thu evening.
+ 276893 [ruby@an hr p] I'll be there, arriving Thursday night.
+ 276911 [s.d@co ca t.] I'll be in Charlotte Thursday evening, in time for my initiation
+ 276912 [ben@bl yt in] I'll be there late Thursday.
+ 276917 [rsanheim@gm ] I will be there late Thursday with quite a few other folks from Relevance.
+ 276941 [Bil.Kleb@NA ] Plan to arrive Thursday afternoon.
| 276946 [s.d@co ca t.] I'm connecting in Dallas to American Airlines flight # 644  to Charlotte.
| 276947 [matt@te hn r] I'm arriving at 12:13 PM tomorrow.  How do we find our fellow conference
| + 276966 [jeremy@hi eg] I and a few others are arriving from Denver Thursday evening, late
| | 276969 [dblack@ru yp] Not everyone is an alumnus of an earlier RubyConf, though. If you
| | + 276974 [matt@te hn r] But how do you get a pickaxe through security?
| | | 276996 [anthonyeden@] If you have to ask you don't deserve to get a pickaxe through security. ;-)
| | + 276993 [rick.denatal] Well I won't be at the airport anyway, and I'm staying at the
| |   277003 [djberg96@gm ] Kill, kill, KILLLLL!!!!!!!!!!!!!!!!!!
| + 277025 [znmeb@ce ma ] How about the new Ruby logo?
|   277077 [obiefernande] ...
|   277110 [bplummer@za ] OK Obie...  Purchased you dang book... :-)  Hope its a good one:-)
+ 277017 [drbrain@se m] You can't hide, we will find you.
threads.html
top