278625-285666

278367-283860 subjects 278827-310347

Export to Excel Spreadsheet
278625 [AMACIEL@bb c] =20 I'm looking for a reporter for Ruby, I need to export some data to a

ActionMailer integration tests with Rails
278626 [amarcaurele@] using ActionMailer, during integration tests with Rails.

Including nil HTTP header
278629 [liu_edward@e] I am trying to connect to a web service with an HTTP request, and I am
278630 [mortee.lists] Just out of the top of my head: what about setting the header entry to

extconf.rb >> mkmf
278631 [mcse@pa st k] I would like to extend my rubyapp with a c++ program. I used the
278844 [youngh@ca da] I had a similar problem and came up with this ugly hack (hopefully

Export to Excel Spreadsheet
278632 [AMACIEL@bb c] =20 I'm looking for a reporter for Ruby, I need to export some data to a

Re: nested namespaces: so many spaces
278636 [furtive.clow] Bio = Module.new
+ 278640 [jan.aerts@gm] Thanks. It looks like this does the trick.
+ 278747 [furtive.clow] I should clarify that I could have written

gem install problem
278641 [bad_good_lio] bcck@tom-desktop:~/packages$ gem update
278814 [tom@in oe he] Hm, it looks like your RubyGems is fetching the uncompressed gem index -

alias_method :tap, :affect
278643 [josh@ha ma y] Ruby's enumeration message names come directly from its Smalltalk
+ 278652 [rick.denatal] Of course, active-support also defines the same method as Object#returning
| + 278656 [josh@ha ma y] Not exatcly.  #tap works on the receiver, #returning works on an
| + 278657 [furtive.clow] This is the first I've heard of Object#tap.  It seems backward because
| | + 278662 [furtive.clow] It would seem Object#tap is for the imperative style and Object#as is
| | + 278663 [martindemell] #tap is the opposite use case - you want to "tap" the object stream,
| | | + 278669 [josh@ha ma y] That's a great example of a use-case for #tap. (I think I remember that
| | | + 278675 [furtive.clow] OK I understand Object#tap now.  At first I thought the motivation was
| | |   + 278678 [james@gr yp ] I guess I want to see some more examples, because I'm seriously
| | |   | 278685 [furtive.clow] On Nov 12, 3:55 pm, James Edward Gray II <ja...@grayproductions.net>
| | |   | 278688 [james@gr yp ] My counter argument would be that, if it becomes non-trivial, you're
| | |   | 278691 [furtive.clow] On Nov 12, 4:37 pm, James Edward Gray II <ja...@grayproductions.net>
| | |   | + 278692 [james@gr yp ] file_name = File.basename(input.join.gsub(re, "_"))
| | |   | | 278693 [furtive.clow] On Nov 12, 5:25 pm, James Edward Gray II <ja...@grayproductions.net>
| | |   | | 278695 [james@gr yp ] If the Regexp contain such an anchor, we probably shouldn't be
| | |   | | 278705 [furtive.clow] We don't know what's in re, so we can't make a judgment about gsub.
| | |   | | 278706 [james@gr yp ] If you don't know the contents of the Regexp and thus you call gsub
| | |   | | 278708 [furtive.clow] On Nov 12, 6:39 pm, James Edward Gray II <ja...@grayproductions.net>
| | |   | | 278710 [raulparolari] The exchange was great from both sides.
| | |   | | + 278739 [furtive.clow] Of course I understand JGII's point, but he does not understand mine.
| | |   | | | + 278783 [james@gr yp ] Careful there.  Let's not turn this into name calling.
| | |   | | | | 278792 [furtive.clow] On Nov 13, 8:35 am, James Edward Gray II <ja...@grayproductions.net>
| | |   | | | | 278794 [james@gr yp ] Just for the sake of the archives, note that the above should use sub
| | |   | | | | 278798 [furtive.clow] On Nov 13, 9:18 am, James Edward Gray II <ja...@grayproductions.net>
| | |   | | | | 278799 [james@gr yp ] I'm uncomfortable with that line of thinking.  When I don't know what
| | |   | | | | 278803 [furtive.clow] On Nov 13, 9:38 am, James Edward Gray II <ja...@grayproductions.net>
| | |   | | | | 278807 [james@gr yp ] class Object
| | |   | | | | 278817 [furtive.clow] On Nov 13, 10:04 am, James Edward Gray II <ja...@grayproductions.net>
| | |   | | | | + 278859 [furtive.clow] ion;)
| | |   | | | | + 278904 [dan-ml@da 42] "These are not bad people, they're just programmers, and programming
| | |   | | | + 278845 [ara.t.howard] email isn't the greatest medium to attempt to determine tone and i
| | |   | | + 278810 [kbloom@gm il] OK. But if re isn't suited to a global replace, then we're using sub
| | |   | + 279210 [no@sp m. le ] It wasn't entirely a coincidence that JEGII found concat - it's
| | |   |   279219 [shevegen@li ] Not sure that I am able to contribue to this discussion, but I must
| | |   + 279109 [botp@de mo t] # On Nov 12, 2:31 pm, Martin
| | |   | 279112 [dblack@ru yp] ...
| | |   | 279113 [james@gr yp ] It's like "tapping" a call chain, just as you would tap a phone call.
| | |   | 279116 [dblack@ru yp] It's like tapping a phone call after the call is over :-)
| | |   | 279205 [botp@de mo t] # >> I am an English expert and I have no idea what "tap" is supposed to
| | |   + 279110 [botp@de mo t] # > > This is the first I've heard of Object#tap.  It seems=20
| | + 278689 [furtive.clow] Well, I don't want a block which is evaluated in the instance's
| | + 278910 [caduceass@gm] This can be useful in the right context.  Should it be canonized in
| + 278658 [ara.t.howard] a = MyObject.new.instance_eval{
|   278681 [vjoel@pa h. ] Really?
|   278720 [ara.t.howard] quite true.  still, i personally think such a cozy method as tap/
+ 278666 [ymendel@po o] I remember some of this talk from RubyConf IRC, and I'm still not

User awake?
278646 [ernst@ta ak ] I am a new RUBY programmer. so far I managed to write a 'listener' for
278649 [jan.svitok@g] depends on the system you are on.
278682 [ernst@ta ak ] Thanks for you help -- I will look into that direction.

How to reload available rubygems in a long running process
278654 [pubsub@ru yi] In my Ruby monitoring framework, god, I have the ability to load
278857 [drbrain@se m] Gem.clear_paths
278950 [pubsub@ru yi] ...
278954 [drbrain@se m] Hrm, with RubyGems 0.9.4.7 I ran your script and I get one fail, not
278956 [pubsub@ru yi] ...
278958 [drbrain@se m] I think that 0.9.4 was resetting the wrong variable, but that's a dim

What folder are user created Classes traditionally stored in?
278655 [williams.jay] What is the traditional location for user made classes?
+ 278696 [rubytraining] It really depends on what you want.  Have you created some classes
+ 278711 [dangerwillro] Wherever they make the most sense to the creator.

What's up with RAA
278667 [rmagick@gm i] I've been getting "502 Bad Gateway" whenever I try to access
278684 [julianraschk] I think this may be hijacking your post, but does anyone know what's

Open URI and web scraping...
278668 [theopensourc] I apologize if this is off topic but I couldn't figure out how to reach

How to debug failing Kernel.system call
278687 [donald.ball@] system('svn', 'commit', '-q', '--non-interactive', '--message', 'File =
278777 [alex.shulgin] On Nov 12, 11:31 pm, "Ball, Donald A Jr (Library)"
278886 [donald.ball@] I've switched to using the single argument version of system doing my
278977 [alex.shulgin] On Nov 14, 12:20 am, "Ball, Donald A Jr (Library)"

Fractional part of a float
278697 [jari.william] Is there any built-in method to get the fractional part from a float, or
278699 [bbxx789_05ss] 8.2675.modulo(1)
+ 278703 [nightphotos@] irb(main):015:0> -1.2.modulo(1)
| 278709 [apeiros@gm .] -1.2.abs.modulo(1) # => 0.2
+ 278704 [lloyd@2l ve ] It sounds as if we need a new method for numbers, mantissa, where the

Net::NNTP accesses private methods?
278698 [ihatespam@ho] I'm trying out Net::NNTP and it's accessing a private method on line

How to wrap code examples in comments
278707 [villas82@gm ] I tried to post this in ruby-talk@ruby-lang.org but nobody seems to be there.
278713 [villas82@gm ] I found the answer by accident, just adding extra spaces at the begin
278717 [villas82@gm ] I found the answer again, wow this list works great. Just adding or

[ANN] JRuby Talk by David  Koontz at Phoenix Java User Group
278718 [james.britt@] David Koontz, of Rising Tide Software, will be giving a keynote talk

File Uploading in Ruby
278725 [neranjan125@] i am a totally new comer to the Ruby and currently i have stared working
278773 [kriswindham@] I have good luck with attachment_fu
278818 [eize.sus@gm ] try to use http://www.pdfetch.com and look for a tutorial there, i found

Indenting REXML output...
278726 [sonny.chee@g] Hey Guys,
278727 [konrad@ty er] charset="utf-8"
278729 [sonny.chee@g] Thanks for the tip, Konrad!
278752 [shortcutter@] Not necessary.  Documentation is your friend.
278826 [sonny.chee@g] Awesome, even better! Thanks Robert. I was actually reading that
278831 [jari.william] Do you get that formatting to work? I get a NameError exception
278838 [sonny.chee@g] I got the same error message as you did Jari.  But I did find the REXML

Re: name of a variable, at runtime
278728 [bbxx789_05ss] In case you wanted an explanation of how things work, take a look at

2008comp.lang.ruby
278732 [mathivram@ya] the comp.lang.ruby..

Outputting file sizes of each item in a directory (error)
278733 [pood.forums@] Dir.foreach("bad") do |f|
278737 [alexg@ku cr ] Dir.foreach("bad") do |f|

setting attributes with composition
278740 [hawat.thufir] The Dragon class is composed of the Room class and the Traits class.
278741 [hawat.thufir] I seem to have omitted the particular ruby file which directly
278759 [thorsten@80 ] all i can see here, without too much analysis of your code, is that you
278762 [hawat.thufir] Yeah, spellink error corrected (thanks).  I want to be able to set the

Yielding an object and caring about the result: the cousin of Object#tap
278742 [furtive.clow] The idea of Object#tap is to insert a "listener" (like tapping a phone
278744 [furtive.clow] t = stems.map { |f|
+ 278751 [shortcutter@] IMHO introducing temporary variables with proper names can go a long
| 278755 [furtive.clow] OK, point taken about the proper name.  Nonetheless I am surprised
| + 278765 [shortcutter@] I don't subscribe to that. It depends on the individual case.
| + 278767 [dan-ml@da 42] This kind of suggestion has been made several times in the past and,
|   + 278768 [shortcutter@] Hmm...  But this has the drawback that - since it's not defined on
|   | 278772 [dan-ml@da 42] It doesn't need to be explicitly defined on Object if you know that it's
|   | 278774 [shortcutter@] Actually not, because I can do obj.public_methods(false). Also, if I
|   + 278784 [furtive.clow] I think we are generally on the same page, but I would add that to_a,
+ 278853 [ara.t.howard] the very real problem with this sort of thing is that exceptions will
  + 278856 [ryand-ruby@z] I agree with the whole of Ara's response and was debating whether to
  + 278864 [furtive.clow] Ara,
  | + 278884 [ara.t.howard] (replying via google groups - sorry for any formatting issues)
  | | + 278981 [furtive.clow] Let's compare them again.  I changed some variable names which will
  | | | 278987 [shortcutter@] Why do add_suffixes and add_prefixes have to be methods that work on a
  | | | 278999 [furtive.clow] add_prefixes and add_suffixes examine the array; they cannot be
  | | | 279000 [james@gr yp ] Is it possible for you to give us a real example, that functions as
  | | | 279066 [dan-ml@da 42] But you can *always* refactor code to fit a particular style. FC wants
  | | | 279068 [ara.t.howard] this seems pretty close to the mark.  i realized that, for me, #as
  | | | 279165 [shortcutter@] Interesting point although I am not sure whether #as is really
  | | | + 279345 [furtive.clow] Whether the function call syntax is prefix, infix, or postfix is
  | | | + 279370 [ara.t.howard] i guess it reminds of 'let' a little...
  | | |   279443 [shortcutter@] Well, you could of course just do
  | | + 279202 [sean.ohalpin] Me too, though that may be an ancient aversion to null pointers in
  | |   279273 [shortcutter@] I seriously dislike the pattern above for the following reasons: it
  | |   + 279362 [ara.t.howard] this just jumped into mind
  | |   | 279367 [dblack@ru yp] When would it ever be empty?
  | |   | 279410 [ara.t.howard] sorry - through a compact in there...
  | |   + 279405 [sean.ohalpin] Well, I don't really see the difference myself - but then I am
  | + 279001 [transfire@gm] what the heck is wrong with
  + 278901 [dan-ml@da 42] That's just false. The backtrace will have the correct line number, no

Re: Outputting file sizes of each item in a directory (error
278743 [pood.forums@] excellent, thanks it worked!
278748 [konrad@ty er] charset="utf-8"

Recursion occur when compile ruby source code
278746 [jarvis.luo.c] I got problem in compiling the ruby source code,./configure works

how to use URI and regex URL http://www.blog.com/57648392
278750 [aleli.lopez@] im creating a pagehandler script

Whats the ruby way of associating metadata with a function
278754 [keithgchapma] I've pretty new to ruby and still getting to know how ruby works. I want
+ 278756 [shortcutter@] class Foo
+ 278761 [furtive.clow] ==================================================

Re: Whats the ruby way of associating metadata with a functi
278760 [keithgchapma] If I extend my question a bit further
+ 278763 [furtive.clow] require 'ostruct'
+ 278766 [shortcutter@] The example is kind of artificial.  Can you disclose more detail on
  279074 [keithgchapma] We are trying to define a way of writing web services in ruby (Code
  279125 [shortcutter@] Well, then it sounds as if you need structured data for a method.

how to ensure signature compliance while mocking in ruby
278764 [pradeep.gatr] Let me put my dilemma as an example. Take a look at a snippet from
278780 [jamesmead44@] ...
280800 [pradeep.gatr] Sorry for vanishing for a couple of weeks. I have been using ur
285666 [jamesmead44@] I don't think you have to write an integration test for *every*

File Uploading codes
278769 [neranjan125@] I used the following codes found in the net to use to write a file to
278770 [alex@bl ck e] You'll probably get a better response over on the Rails list, but I
278771 [neranjan125@] Thanks a lot for the advice.....

How to create Badge Reports in PDF Format
278776 [anilbhat21@g] I have been trying to create badge reports in pdf format but I
278782 [AEtzold@gm .] Dear Anil,

Open URI & web scraping. Part II
278781 [theopensourc] (short form of a post I made yesterday that got no love, I suspect it'
278785 [AEtzold@gm .] Dear Jean,
278787 [theopensourc] Same issue with RIO (albeit a little more complex to get thae page and
278789 [peter@ru yr ] What does an aggressive wget (i.e. with grab everything options) do?

oci adpater and Oracle
278786 [n.couturier@] trying to use ruby (1.8.6) and activerecord(1.15.3) with oci adapter.
278866 [fred@la av .] connection.execute('alter session set current_schema=scott')
279261 [n.couturier@] Thanks for your answer.
279267 [fred@la av .] Well, at first, try to connect to the DB with a query tool (using the
279281 [n.couturier@] It did the trick.

How do I exit from a block
278790 [jigar.gosar@] base_dir = "C:/pde"
+ 278793 [stefano.croc] You should use break instead of return.
| 278801 [jigar.gosar@] def list base_dir, prefix
| 278808 [shortcutter@] That would be "next".  Note that exiting from a block and switching to
| 278812 [jigar.gosar@] Thanks for clearing that up, I am thoroughly impressed with the ruby
+ 278795 [shortcutter@] Why do you use "puts" here?  As far as I can see you do the printing in #list.
  + 278800 [dam@co in x.] Or even
  | 278805 [jigar.gosar@] Thanks a lot, this is so cool, how did I miss it
  | 278819 [dam@co in x.] If you want only the name of the file, use
  + 278804 [jigar.gosar@] Find look intresing, will solve my problem, thanks.

method_added/define_method infinite loop
278796 [transfire@gm] What's the best way to avoid the classic method_added/define_method
+ 278867 [ara.t.howard] class X
| + 278918 [transfire@gm] nice. i like the way you did that. thanks ara.
| | 278939 [ara.t.howard] class X
| + 278924 [phrogz@ma .c] What was your motivation for the above code instead of simply
|   278937 [ara.t.howard] -e:1: warning: instance variable @foo not initialized
+ 278929 [cdcarter@gm ] I might be missing something, but I cannot think of a practical use
  278967 [transfire@gm] I'm impractical ? ;)

Re: [mocha-developer] how to ensure signature compliance while mocking in ruby
278802 [dchelimsky@g] I beg of you, please don't. At least not as a default behaviour.

array ordering / selection according to elements -
278811 [shaiguitar@g] given that time1 < time2 < time3 < time4 ... (and are all Time objects)
+ 278821 [shortcutter@] Define "nearest".  What happens if time4 is not present in the array
| 278825 [michel.boave] Try to include time4 on the array, then sort it. Lood in wich position
+ 278823 [dale.martens] You could do something like this. It only would work for exact
+ 278829 [apeiros@gm .] array.min { |a,b| (closest_to - a).abs <=> (closest_to - b).abs }

Problems with rexml
278813 [mario@be wa ] require 'firewatir'

best open source sample
278816 [schafer.dave] and learn from.    I'd like it to access mysql and take queries from
+ 278822 [michel.boave] If you like web and sql, try to take a look on rails.
| 278832 [schafer.dave] On Nov 13, 8:44 am, Michel Boaventura <michel.boavent...@gmail.com>
+ 279102 [richard.conr] In general Rails seems to be the only active Ruby Open Source project

Handy method Object#in?
278820 [kamil.kukura] class Object
+ 278824 [dblack@ru yp] This is a bit of a perma-thread on this mailing list. I guess it's
+ 278835 [transfire@gm] a.include?('world')
| 279108 [botp@de mo t] # > class Object
| 279120 [transfire@gm] true enough, computer language tend to force different order though.
+ 279409 [sean.ohalpin] It is nice, but I would advise you to profile code that uses it and
threads.html
top