253526-254921

253321-377184 subjects 253790-255470

#respond_to? not working for dynamically generated methods
253526 [maurice.glad] It seems Object#respond_to doesn't work for dynamically generated
+ 253530 [stefano.croc] Are you sure find_by_name is a class method and not an instance method (i.e,
| 253533 [nobu@ru y- a] method_defined? would be better in almost cases.
+ 253543 [dblack@wo bl] That's what responding to a method means.  Otherwise, it would be
  + 253545 [dan-ml@da 42] Or you have to patch rails so that respond_to? will take this case into
  + 253552 [robert.dober] Does not look right though
    253555 [dblack@wo bl] No, it's just using method_missing, which intercepts the
    253558 [robert.dober] Ok that is acceptable ;) thx for the clarification.
    253653 [wonado@do ne] Only as a remark for a special usage, which is not easy (impossible?) without
    253662 [robert.dober] Hmm as fellow native German Speaker I think your English is perfect.
    253747 [wonado@do ne] I don't know, because it is a special situatuation, and it is very experimental.
    253749 [robert.dober] Well it still sounds very interesting to me, I remember when I was
    253767 [wonado@do ne] Yes, these methods are something like "executable attributes" - but - I would

Unit-testing and sessions.
253529 [seebs@se bs ] So, I have started on a unit testing framework for the modules I'm

Re: #respond_to? not working for dynamically generated metho
253532 [maurice.glad] => false
253539 [sascha.abel@] I think 'Object#respond_to?' just looks at a list of previously
253556 [maurice.glad] It would be possible to define at writing time the entire range of
+ 253563 [dblack@wo bl] That's every possible string you can sent to an object.
| 253564 [james@gr yp ] I don't really understand this stance.  My opinion is that providing
| + 253569 [robert.dober] I have always felt that dynamic method creation and dynamic message
| | 253578 [james@gr yp ] I'm not really sure what else to say.  I read the documentation for
| | 253647 [robert.dober] James the documentation is not correct anyway, look at the wording,
| + 253579 [maurice.glad] I must agree with James Edward Gray here.
| | + 253583 [B.Candler@po] As an edge case, consider a DRb client proxy object. Should respond_to? be
| | | + 253585 [james@gr yp ] I agree with everything you just said and it still doesn't convince
| | | + 253592 [maurice.glad] That's certinly true, but the rescue technique you describe is not a
| | |   253594 [B.Candler@po] I'm saying that if you're doing
| | + 253590 [dblack@wo bl] But it can happen; hence NoMethodError.
| |   253596 [maurice.glad] #respond_to? is usually used when we don't know exactly which object is
| |   + 253602 [dblack@wo bl] #respond_to? != duck typing, though.  At least "hard" duck typing is
| |   + 253608 [james@gr yp ] #!/usr/bin/env ruby -wKU
| |     253646 [robert.dober] This is very interesting, I just imagine that dynamic_finder does not
| |     253654 [james@gr yp ] Well, if it can't be made accurate, that's a different thing.  First,
| |     + 253659 [robert.dober] And so do I, well that sounds quite prepotent, I know.
| |     + 254921 [dblack@wo bl] I just raise an eyebrow at that much repeated/parallel code.
| + 253595 [rmagick@gm i] FWIW, there's an entry about this in the Ruby Style Guide on
|   253598 [dblack@wo bl] Hmmm... perhaps there needs to be a second entry explaining why it's
+ 253572 [B.Candler@po] Hmm, everybody forgets to anchor their regular expressions :-)

Remove from mailing list
253534 [ebpoux@gm il] ...

Hash behavior query
253551 [abhisek.datt] irb(main):001:0> d = [1,2,3,4]
253553 [dblack@wo bl] You've pretty much reproduced the documented example from the source
253557 [robert.dober] ... and furthermore was there not somebody asking whether to prefer

Help with Ruby < - > Oracle Connectivity
253567 [pbailey@bn .] I can't seem to get connected to an Oracle server here at my company.
253576 [B.Candler@po] Check your tnsnames.ora file.
253584 [pbailey@bn .] Thanks, Brian. I had one of our company DBA guys come down and installed
253591 [B.Candler@po] Unfortunately, you've missed out the important bit, which is what goes where
253774 [pbailey@bn .] OK, Brian. Thanks for your help. Well, here's the dinky script I'm
+ 253776 [olsonas@gm i] This is the part you should be interested in. Make sure you are using
| 253777 [pbailey@bn .] Connecting with SQLPlus, I used "grpprod" as my target database. I put
+ 253779 [B.Candler@po] Can you connect using the sqlplus command line? I didn't even know that
  253832 [pbailey@bn .] Here's my tnsnames.ora file, Brian.
  253848 [B.Candler@po] Your login has been successful. Now you just need to learn Oracle SQL :-)
  253871 [pbailey@bn .] Success! Thanks, Brian! I got something. Here's what I put in there, at
  253875 [B.Candler@po] If you google for "ruby dbi tutorial", the first hit is
  253878 [pbailey@bn .] Thanks, Brian. Yes, that Oracle doc. you pointed me to looks pretty
  253886 [B.Candler@po] Absolutely. That's how I first started using it.
  253888 [pbailey@bn .] Yup, I've got that book, too, and it looks great, from what I've read so

[ANN] Looking for submissions for a "Ruby Project Spotlight" series
253568 [gregory.t.br] Hey folks,

Enumerable#serially - those nifty functions w/o memory footprint
253570 [sonoflilit@g] (1..1000000).to_a. # anything that is a huge enumerable can work as an example
+ 253574 [sonoflilit@g] module Enumerable
| 253581 [B.Candler@po] Somehow I don't think you tested this :-)
| 253618 [phelan@tt ec] interpretation of what he is trying to do.
| 253626 [phelan@tt ec] A quick profile with ruby-prof find the above technique about 10 times
| 253633 [phelan@tt ec] This little bit of code has got me interested. Turns out I can create a
| 253638 [sonoflilit@g] module Enumerable
| 253640 [sonoflilit@g] 4.75 against 1.56 isn't too good, but it isn't ten times slower. I
| 253717 [shortcutter@] ...
| + 253719 [phelan@tt ec] I can get comparable results for my solution
| | 253736 [shortcutter@] ...
| + 253745 [bradphelan@x] Now who's changing the subject? Of course if you fold all your desired
+ 253580 [shortcutter@] Just guessing what all this does, but there is of course the obvious

redbox question
253582 [cragmor@gm i] I have built, with the massive help of a friend, a website to showcase
253601 [cragmor@gm i] Ok, I am an idiot, and deserve to made to cry. I did find where to

[ANN] rutema 0.3 Released
253587 [damphyr@fr e] rutema version 0.3 has been released!

[ANN] ruport-util 0.6.0
253588 [gregory.t.br] == Ruby Reports Utilities (ruport-util)

How can access to AUTH_USER?
253593 [music@mu i. ] With php I can access to AUTH_USER and REMOTE_ADDR to know the
253597 [shortcutter@] Guessing that you are talking about CGI the value is likely accessible
253738 [music@mu i. ] Yes I'm talking about cgi in ruby.
+ 253741 [skoot@id ic ] =20
+ 253743 [jan.svitok@g] ones, as suggested in the previous mail, or check your webserver

Substituting Variables
253600 [boss@ai bl d] I am running into difficulties trying to use a variable in a
+ 253603 [dblack@wo bl] David
| 253609 [boss@ai bl d] That works swimmingly.  Such fast replies too.  Thank you very much!
+ 253604 [lparravi@gm ] Use double slashes.
+ 253605 [kane.sub@in ] Use double quotes and escape slashes.
+ 253606 [aledonne.lis] '30 May 2007'.sub(re, '\1 ' << var << ' \3')
  253612 [shortcutter@] Um, what?  Assembling strings is exactly what string interpolation is
  253663 [aledonne.lis] Sorry for my imprecision, and thank you. I meant to say that if you're

Re: Kiss your boring tasks goodbye: Everyday Scripting With
253610 [arvindmmm@gm] yes i am agree with you.

Call for Ruby Champion !!
253613 [srinivas.gun] I am looking for a Ruby Champion to lead the race in Website
253637 [DPhillips@cy] Given that the same individual also posted this same message to the
253677 [gregory.t.br] It's clear what they want.  They want a Champion.
253687 [reid.thompso] Isn't that a spark plug?
253694 [znmeb@ce ma ] Spark Plug was Barney Google's horse. Betcha didn't know that Google's
253700 [znmeb@ce ma ] Wait a minute!! Champion was Gene Autry's horse! It's a conspiracy!!

RubyD -- Ruby in D?
253615 [jzakiya@ma l] I was looking through the latest Linux Format Magazine,
253622 [cesar.orihue] ...
253624 [deanwampler@] ...

using hash for method parameters
253616 [aidy.rutter@] #hi,
+ 253617 [roseanne@ja ] Are you creating your new language?
| 253620 [aidy.lewis@g] Thanks for the post, but I am trying to explicitly name the parameters
| + 253630 [gthomas@ta a] class Login
| + 253730 [skoot@id ic ] def with params =3D {}
+ 253623 [m_goldberg@a] You could do it with

inet_addr inet_ntoa
253629 [rfiorentino@] I tried looking up answers for this with little success...any help is
+ 253635 [lparravi@gm ] You can get the ip in network order using Socket.gethostbyname
+ 253644 [B.Candler@po] ri Array#pack

question about mailfactory.
253636 [funkytwig@gm] I am using the mailfactory from rubyforge.  It seems to work well.

[ANN] RubyScript2Exe 0.5.3
253639 [erikveen@gm ] I've updated RubyScript2Exe. I had to, because RubyScript2Exe

symbol lookup error
253641 [audunskaugen] I have recently become interested in Ruby as an alternative to Python. I
253656 [drbrain@se m] Shouldn't there be a -lode in here somewhere?

[ANN] image_science 1.1.3 Released
253649 [ryand-ruby@z] image_science version 1.1.3 has been released!
253652 [james@gr yp ] James Edward Gray II
+ 253655 [donald.ball@] For what it's worth, I run rmagick in a (lightly-used) production
| 253658 [ryand-ruby@z] More FUD! How many times I've heard this crap I have no idea... We've
| 253762 [donald.ball@] Apologies for the misinformation. All I know is that on my win32 box, if
| 253793 [james.herdma] ...
| 253897 [ryand-ruby@z] That's the first I've heard of for mongrel. I just dealt with
+ 253657 [ryand-ruby@z] So? He and I disagree. Big deal. We've done it before [1], I'm sure
| 253660 [james@gr yp ] Well, I was thinking it might be worth it to submit bug reports to
+ 253664 [TimHunter@nc] Thanks for reposting my earlier request, James. I'll repeat it here for
  253673 [list.rb@gm i] ...

Does this benchmark make sense?
253666 [ff@on be t. ] I was playing around with some Ruby features and benchmarked the
253703 [B.Candler@po] [self.x]
253707 [ff@on be t. ] [self.x]
253709 [B.Candler@po] So, "Klassname.t" and "self.class.t" are almost identical (where 'self' is

IRC
253669 [ari@ar br wn] I did a ri IRC just now, and it came up with a class document for

Licence information
253671 [ramachander.] Can you help me with a question that I cannot seem to find an answer
253672 [vjoel@pa h. ] (a lucky guess)
253696 [ramachander.] Thanks much! Joel

`concat': can't modify frozen string in benchmark.rb
253676 [botp@de mo t] def f(command_here)
253679 [vjoel@pa h. ] x.report(k.dup) { f v }
253682 [botp@de mo t] #

Re: [QUIZ] Fractals (#125)
253680 [email55555@g] #---------------------------------------------------------------------#

DRb and Thread safety
253681 [erwin.abbott] I've been reading about DRb and one issue that I still have questions
+ 253692 [drbrain@se m] Having your database be a Rinda::TupleSpace is one way around it.
| 253714 [erwin.abbott] few discussions on ruby-talk while researching DRb)!  From what I've
+ 253705 [B.Candler@po] There's some examples which do this at
| 253716 [erwin.abbott] Glad you mentioned the Google cache... I kept finding links to that
| 253731 [B.Candler@po] I have a good book on principles of operating systems which talks a lot
| 253733 [B.Candler@po] Hmm, the code I gave didn't actually do this :-) But it did allow multiple
| 253819 [erwin.abbott] Marcin and Brian,
| 253827 [swistak@ma l] Mutex - is block that can't be run concurently
+ 253723 [swistak@ma l] that let you find tuples (arrays) with one element matching.

Corruption when modifying array element
253684 [alan.lake@la] When modifying an element in a row, the result becomes corrupted when I
253690 [yermej@gm il] At this point, new_row is the same object as row -- it is basically a

select([]) method
253685 [ari@ar br wn] Hey all
+ 253691 [mday@ma .c m] ...
+ 253708 [B.Candler@po] ...
+ 253722 [swistak@ma l] it's just wraper for c / linux select
+ 253757 [felipe.contr] I agree with other comments, the documentation for select is pretty bad.
  + 253760 [avdi@av i. r] In a nutshell, select() is a system call for use when you have
  + 253781 [ari@ar br wn] Alright, thanks everyone! This really cleared it up, and now i

ANN: Tftpplus 0.4
253686 [msoulier@gm ] ===============

get info from object_id
253695 [botp@de mo t] apologies in advance if this is so stupid for you (my feeble mind is working feebly :)
253697 [vjoel@pa h. ] ObjectSpace._id2ref is what you're looking for.
253698 [botp@de mo t] # > Given an object_id, how do i get back the object that id stands for?
253766 [vjoel@pa h. ] Thanks for reminding me about qri.

ANN: Tftpplus 0.4
253702 [msoulier@di ] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

HTML Parser: Which one is better?
253711 [gsofhon@gm i] I'm new to Ruby and need to parse some web pages. I googled "ruby HTML
+ 253712 [rasputnik@gm] Hpricot is a good starting point.
| + 253720 [gsofhon@gm i] OK, I got it. Thanks a lot.
| + 253721 [richard.conr] Yeah Hpricot is good, but in general the quality of the Ruby web scraping
|   + 253801 [erik@ho le s] I've had great success with this. Just make sure you're using a later
|   + 253952 [gsofhon@gm i] Thank you all for your help.
|     254019 [grblanco@gm ] I've used HPricot, and really like it.
+ 253787 [subsume@gm i] Rubyful soup I like. Its highly simple to use although the construction

simple markup to html
253713 [mb@li mp .m ] trying to convert simple markup to html, works fine with
254227 [mb@li mp .m ] ok, I found the "class HyperlinkHtml < SM::ToHtml" in

REXML documentation offline?
253724 [alex@bl ck e] Can anyone get through to
+ 253726 [robert.dober] NP 4 me
| 253729 [alex@bl ck e] Hmm...  It's working fine now.  Thanks anyway...
+ 253728 [bino@in oa s] It looks fine

Looking for a pure Ruby uniq ID generator
253732 [user@do ai .] In fact, quite the same as the uniq *nix/cygwin command but fully writen
+ 253735 [user@do ai .] I mean, uuidgen
| 253737 [lparravi@gm ] A google search shows ruby-uuid (
+ 253754 [garbagecat10] ...

Does this code spawn lots of objects?
253739 [funkytwig@gm] I have the following code:-
253740 [shortcutter@] Probably not much room for improvement.  One thing you can do for sure
+ 253751 [funkytwig@gm] What difference will this make?
+ 253752 [funkytwig@gm] Sorry, forgot to ask.  What do you mean by block form?
  253753 [shortcutter@] DBI.connect('*', '*', '*') do |dbh|

[SUMMARY] Fractals (#125)
253748 [james@gr yp ] I lied to Morton Goldberg.

RubyForge offline
253756 [tom@in oe he] RubyForge is offline; we're investigating now.
253758 [tom@in oe he] It's back online now.  'Twas some sort of ext3 problem, still

Number formatting
253761 [coryw@am ri ] folks - can't quite figure this one out...
+ 253763 [B.Candler@po] foo = 5
+ 253764 [donald.ball@] sprintf('%02d', foo)
+ 253765 [lparravi@gm ] Try using Kernel#printf.

Re: Set intersection with a specific criteria: a better idiom?
253768 [vjoel@pa h. ] Hm, it's like Schwartzian transform: intersect_by instead of sort_by.
+ 253769 [vjoel@pa h. ] Hm, it's like Schwartzian transform: intersect_by instead of sort_by.
+ 253829 [shortcutter@] Basically you want to do the intersection based on a specific criterion.

Getting Response from HTTPS POST
253770 [whiteqt@gm i] I am writing a crawler to parse webpages. One site that I am crawling

Error while opening SSH
253771 [mmutham@gm i] I am new to ruby. I was planning to automate some deployment processes

"break" from a block and a proc object used in block position
253772 [wonado@do ne] In german ruby-forum we had a question which ends up in unclear situations. The

Trying to send an email with attachments
253778 [ryangs@ma .c] I am working on a script that will send an email with a .csv file

Trying to send an email with attachments
253780 [ryangs@ma .c] I am working on a script that will send an email with a .csv file

[ANN] Hackety Hack libs (as a gem)
253783 [why@ru y- an] Good day, everyone.
253789 [frioux@gm il] I know I am totally stoked!  Hooray for a version that I can use as well!

logging off windows users remotely with ruby
253785 [gianmh@gm il] We have about 11 windows 2k/xp boxes that I would like to force a logoff
253841 [jftucker@gm ] rundll32.exe user32.dll ExitWindowsEx
253873 [jan.svitok@g] Additionally you can use WMI through Win32OLE, and issue the commands that way.
threads.html
top