312670-410612

312455-313772 subjects 312835-325443

adding string and numbers
312670 [raver_iggy@h] i'm new at programing. and i was trying to figure out how you add
+ 312673 [dmerrick@ic ] (name1.length+name2.length+name3.length).to_s
| 312674 [raver_iggy@h] hurray that worked!
| 312677 [caduceass@gm] (integer + integer + integer).to_s
+ 312675 [caduceass@gm] name1.length and friends are numbers, not strings.  You might have to
  + 312753 [caduceass@gm] To comply with your original requirements, that last line should be...
  + 312755 [caduceass@gm] To comply with your original requirements, that last line should be...

ANN: Melbourne (Australia) Ruby user group this Thursday
312676 [pete@no ah t] It's the Melbourne Ruby User Group this Thursday (28th of August @

Bug in IRB
312680 [glenn.potter] Running ruby version ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
312690 [shortcutter@] The error looks like you were trying to write to a filesystem which has
312723 [glenn.potter] Thanks Robert, i looked at the irb code but couldn't see any problem. I
312764 [shortcutter@] Sounds as if you replaced an in memory search by a DB search.  Maybe

Still Query Continues
312684 [hema@an le i] Thanks for taking time for Reply.
312707 [sandor.szuec] yes.
312824 [hema@an le i] Again I have to start from the scratch..From The beginning itself i got
312974 [sandor.szuec] You define the last part of your target: ends with .jpg or .png

[ANN] webby 0.9.0 (Vegan Velociraptor)
312685 [tim.pease@gm] Webby version 0.9.0

need your help orviews for distributed programming with ruby
312686 [saurabh.purn] greetings,
312688 [gregory.t.br] Technical Blaag at: http://blog.majesticseacreature.com | Non-tech
+ 312689 [vjoel@pa h. ] I?m trying to make a peanut butter sandwich. Please post a diagram of
+ 312697 [james.britt@] Wow.

need your help orviews for distributed programming with ruby
312687 [saurabh.purn] ...

how this will look in ruby?
312693 [avinash.maga] sorry for asking conversion and not doing it myself(since I've little
312694 [gregory.t.br] def format(string)

Display day,month,year in combo box
312695 [gani_chinta@] Anybody know how to display day,year,month in single drop down if

parceexcel and fields in xls file
312696 [vidya_ramach] I am having a problem in reading the columns from an xls file.
312703 [sandro.pagan] ...
313175 [saravanankri] Sandro's thought is absolutely right. Still if you have problem let me

regexp match and nil
312698 [adamtemporar] heres my function
+ 312701 [jgabrielygal] one for the =~ and one for the match,  which is not optimal. I would
+ 312705 [botp@de mo t] # def remove_for_such_and_such(a_string)
  312733 [adamtemporar] thanks guys.. ill look into sub as well...couldnt tell what would happen

word boundaries for regular expressions
312699 [adamtemporar] looking for.
+ 312700 [stefano.croc] string.gsub(/\sJP\b/, '')
+ 312708 [uzimonkey@gm] If the spaces are consistent, you can do something like this
+ 312763 [shortcutter@] Yep, that sums it up pretty well.
  312924 [adamtemporar] Thanks everyone. Yes the strings to match vary a lot in terms of

Uninstalling Ruby 1.8.7 Help
312704 [brandch@gm i] I have run into a bind, and need to manually uninstall Ruby 1.8.7 from
+ 312768 [matt@ti bi s] (1) You are on Leopard. You have Time Machine. Next time, just do a
| 312780 [brandch@gm i] Thanks for the responses, I actually picked through it this morning, and
| 312903 [renard@nc rr] The one thing you must do, is to modify your $PATH,   /usr/local/bin
| 312905 [brandch@gm i] /usr/local/bin already appears prior to /usr/bin in my $PATH because I
+ 312769 [gaspard@te i] ...

log a stack trace
312711 [aidy.lewis@g] Is it possible to log a stack trace to a text file?
+ 312712 [larsch@be un] def backtrace
+ 312721 [tpreal@gm il] Posted via http://www.ruby-forum.com/.

BigDecimal with Float comparision bug.
312713 [lunatyq@sm s] I have noticed that BigDecimal may fail in many cases when you try to
+ 312714 [stefano.croc] It works correctly for me (ruby 1.8.7-p72) on gentoo linux (linux 2.6.25, gcc
| 312715 [lunatyq@sm s] It worked previously for me now it does not work.
| 312716 [lunatyq@sm s] ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-freebsd4]
| 312717 [lunatyq@sm s] ruby-1.8.7-p72 returns 0 bad comparisions.
+ 312719 [sandor.szuec] Maybe it is a plattform or version issue.
  + 312728 [lunatyq@sm s] Yea, it is version issue. 1.8.7 seems not to have the bug.
  + 312904 [renard@nc rr] Works for me
    312912 [sgwong513@ho] It works in my ruby in windows :)
    312918 [keeperotphon] ...

in_place_editor_field doesn't work with Float column
312720 [palani.apk@g] Anyone please help me to solve in_place_editor_field .
312762 [gregory.t.br] Please don't double post, and also see my reply on your other post.

tinyMce validation problem?
312724 [ravivardhank] i am using the tinyMce text editor in my rails app.But how to
312729 [ruby@th ma z] I think you've posted in the wrong forum. This is a javascript

in_place_editor_field doesn't work
312726 [palani.apk@g] Please any one help me to solve in_place_editor_field issue. I try to
312761 [gregory.t.br] The best place to find an answer to this is the  Ruby on Rails - Talk

$clipboard = Gtk::Clipboard.get('PRIMARY')... under windows
312727 [dan@vi io sl] I need to be able to read text that has been selected in another

How to open Text File and then insert line in first position?
312731 [paqs140482@g] ...
+ 312750 [dlb.id.au@gm] I would write the headers to a new file and then the content.
+ 312754 [cwilliams@ea] nd
  312757 [paqs140482@g] ...

Passing a block with define_method
312734 [jcoglan@go g] ...
+ 312735 [ara.t.howard] module_eval a string.
| 312737 [jcoglan@go g] ...
| + 312740 [jcoglan@go g] ...
| | 312744 [oga_emmanuel] where does the "func" method come from here? because you are
| + 312741 [oga_emmanuel] I think I saw this "trick" in one of Ara's posts :D
| | 312747 [ara.t.howard] that's correct.  you just need to store the data/block somewhere whcih
| + 312742 [dblack@ru yp] => #<Proc:0x388bdc@(irb):1 (lambda)>
| | 312745 [dblack@ru yp] Actually the fix is in: you can now (and I think permanently) do this
| | 312749 [jcoglan@go g] ...
| + 312751 [ara.t.howard] off the top of my head (un-tested but similar will work)
+ 312738 [matz@ru y- a] You have to wait until 1.9.
+ 312752 [ara.t.howard] module Continuations
  318899 [coderrr.cont] ...

MissingSourceFile: no such file to load -- sqlite3/database
312739 [joao.macaiba] I'm using active_record and sqlite3-ruby (gem) modules. When I try to
+ 312760 [jos@ca no k.] It would be REALLY nice if the maintainers would release 1.2.3 with a fix.
| + 312814 [ninja@sl ph ] True. Or anything, really -- this is damned sloppy.
| | + 312816 [jeremy@bi sw] 1.2.3 was just released!
| | | 312817 [ninja@sl ph ] Seems to be fixed -- or at least, not broken. Thanks!
| | + 312822 [jos@ca no k.] Hey, it worked right before I posted it. :-)
| + 312860 [joao.macaiba] About the changes on "ruby.h", they already there under ruby 1.8.7.
|   312900 [jos@ca no k.] Welcome. But 1.2.3 doesn't run out of the box either, at least on CentOS 5 with
|   312926 [jos@ca no k.] Not sure how I came up with this but it's incorrect. Regenerating the
+ 312775 [erikveen@gm ] Are you sure you've read access on the file?
  312862 [joao.macaiba] -rw-rw--w- 1 root root 24774 2008-08-26 18:54 database.rb

Gems, Proxy authentication
312756 [johnts@ch rt] Updating installed gems
+ 312759 [johnts@ch rt] ruby -rspa c:\ruby\bin\gem update
+ 322366 [ztuaev@si an] I set http_proxy environment var and after executing
  322384 [johnts@ch rt] I was finally able to get it to work by including the username and
  322389 [ztuaev@si an] So did I, but unsuccessful :(
  + 322391 [ztuaev@si an] sorry, shure actually they were
  | 322469 [johnts@ch rt] Hm. Not sure. The first one you list below did work for me. I didn't
  + 322492 [drbrain@se m] Ruby does not support NTLM authentication by default which is what
    322745 [ztuaev@si an] I found out that proxy I had trouble with use ntlm authentication

Insecure operation
312765 [rasfast@gm i] I'm trying to make a CGI script which uses modules from Rails, and
312821 [rasfast@gm i] mod_ruby: error in ruby

gem buffer error (1.2.0)
312766 [hikeeba1@gm ] When I execute some gem commands -- "gem outdated" -- I get a buffer

open3 and background processes
312773 [djberg96@gm ] I've got a poor man's init script where I'm firing off a Ruby process
312774 [Gennady.Byst] IO.readlines will try to read out everything until EOF, hence it "hangs" fo=
312777 [djberg96@gm ] On Aug 26, 1:37=A0pm, Gennady Bystritsky <Gennady.Bystrit...@quest.com>
+ 312834 [B.Candler@po] You're probably thinking of Kernel.select. To poll if data is available for
| 312867 [djberg96@gm ] or
+ 313118 [Gennady.Byst] The problem here is that if your miniserver.rb does not output anything to =

Alternative to Parse::RecDescent
312776 [etaern@ya oo] Hey guys !
+ 312782 [ibc@al ax ne] Not sure if TreeTop is the same type than these parsers, but if it's you
+ 312797 [ryand-ruby@z] If you're specifically looking for LL parser generators, you should
+ 312804 [eric.mahurin] ...
  312805 [james@gr yp ] I cannot wait to hear that talk.  It's on my must see list.  :)

[ANN] Slide Show (S9) Gem V0.6 - New and Improved Support for Using Your Own Slide Show Templates
312779 [gerald@va be] I've added two new options to make it easier to use your own slide

Qtruby4: rbuic4 -kde is always active (Suse Linux 11.0)
312781 [niclas@ko pt] Seems as when compiling *.ui files with rbuic4 -x it always generates

Possible bug in CGI::HtmlExtension::popup_menu?
312783 [cloutier@es ] I'm trying to use popup_menu to generate a select box that remembers
312787 [cloutier@es ] Just as a note, there seems to be a similar issue with explicit "false"

Order of arguments
312788 [jonas.esp@go] if I define a function with several args. as
+ 312789 [vjoel@pa h. ] Use a hash argument
+ 312800 [phlip2005@gm] Supplementing Joel's answer - that code is a Ruby fallacy and should be avoided.
+ 312829 [tpreal@gm il] It will not. In Ruby, the order of passed arguments is the order of

JSON.parse and unicode escape?
312790 [rochkind@jh ] The documentation for the ruby JSON classes (http://json.rubyforge.org/)
316541 [pmwever@gm i] I am running into what seems to be a related problem with the
316542 [Rob@Ag le on] You can only have that code point in UTF-16
316615 [pwever@kn tt] That makes a lot of sense. Thanks for the clarification regarding the

Chris Pine Tutorial 99 Bottles of Beer Program
312792 [sleepingindi] <i>=95 "99 bottles of beer on the wall..." Write a program which prints
+ 312791 [sleepingindi] Also, would there be an easy way to print the words out instead of the
| 312802 [caduceass@gm] Divide the number by 10 and it will give the prefix (ninety-, eighty-,
| + 312863 [Rob@Ag le on] ...
| + 312886 [m.fellinger@] my stab at it
|   313011 [uzimonkey@gm] I did something slightly different, which works on multiple levels, not
|   313017 [reitinge@in ] Unfortunately your implemention fails with multiples of 100.
|   313035 [uzimonkey@gm] So it does.  Just drop the "and" from the strings and it's still
+ 312796 [caduceass@gm] Have a look at the #downto method.
+ 312799 [ryand-ruby@z] puts "#{bottles-1} bottles of beer on the wall"
| 312801 [james@gr yp ] I agree.  I really wish Chris Pine's book taught this, but it does not.
+ 406160 [lists@ru y- ] bottles_of_beer = 99
| 406167 [tamouse.list] def beersong(n=99)
| 406169 [tamouse.list] #{i>1 ? i-1 : "No more"} bottles of beer!
+ 406163 [lists@ru y- ] You should, as previously stated, use #downto.
| 406189 [josh.cheek@g] Fixnum#to_s! doesn't exit.
| 406193 [lists@ru y- ] I stand corrected! In that case, "bottles_of_beer =
| 406195 [tamouse.list] Who's thirsty?
+ 406245 [lists@ru y- ] This problem with this and other examples are people are offering
  + 406276 [tigre7t@gm i] its most interesting because tips demonstrate in ruby how to build succinct
  + 406280 [tamouse.list] One of the big problems with asking questions in an anonymous mailing
  + 406351 [josh.cheek@g] Okay, but we don't know what the book has or hasn't taught, so how can we

Free huge source codes collection
312794 [lfrogerscoba] with text files, database, GUI etc. You can download it here

Deaf Grandma
312795 [sleepingindi] =95 Write a Deaf Grandma program. Whatever you say to grandma (whatever
+ 312826 [tpreal@gm il] #Grandma is deaf!
+ 312830 [sepp2k@go gl] response.upcase and "BYE"  evaluates to "BYE" unless response.upcase returns
| + 312833 [B.Candler@po] That doesn't make sense. response.upcase is always true (not nil or false),
| + 312837 [sleepingindi] Thanks very much for all the help guys.
|   348657 [chrisdow32@h] #Grandma is deaf!
|   348664 [_mwryder@wo ] #Grandma is deaf!
|   348665 [_mwryder@wo ] I missed the part about removing the multiple if's in the oringal post.
|   348676 [chrisdow32@h] That one is sweet. Thanks. I guess I was over thinking it, LOL. I didn't
+ 375356 [ipl.tshirts@] After reviewing the previous posts, I noticed that many answers did not
+ 375381 [b.candler@po] Remember to set your bye counter to zero in every case except where
| 375391 [josh.cheek@g] That's called whispering, deaf grandma won't even bat an eye!
| 375431 [b.candler@po] You might be swearing at her though...
+ 382615 [stevenkinney] I was doing stupid things with arrays and all sorts of dumb crap until I came here and read this thread. Super good work. I wanted my Ruby script to work with the three goodbyes extension exercise mentioned above. AlsoĦ½I like double quotes and #{} to get things done. In my neophyte opinion, it's cleaner and less characters.
| 404626 [lists@ru y- ] It really is...Thanks for the pointers.  I haven't learned loop do yet,
| 404627 [tamouse.list] puts "HI, SONNY!\nIT'S YOUR GRANDMA."
+ 398834 [lists@ru y- ] # Deaf Grandma EXTENDED
+ 404196 [lists@ru y- ] For the full iteration of the problem (upcase, random years & triple BYE
| 404203 [tamouse.list] Still LOTS of repetition here. DRY: Don't Repeat Yourself, not only
+ 410204 [lists@ru y- ] Was really struggling on this, then found this thread, which helped me
| 410221 [sto.mar@we .] the above statement is not necessary
+ 410606 [lists@ru y- ] As a noob learning ruby, I am following the Chris Pine tutorial for
  410610 [rubytalk2dav] If you use double-quotes around the string, you won\'t, er, I mean,
  410612 [me@da id wd ] Excellent explanation, Dave. Clean and simple.

odd behaviour of a script when using -Ku option
312803 [martin.muell] I use Ruby 1.86 on a Macintosh with Leopard.

ENV['_'] present on MacOS X, missing on OpenBSD
312806 [gideon@no am] require(File.join(File.dirname(ENV['_']), '../config/environment'))
312808 [gideon@no am] of course that won't work because we are not in the rails environment. I

Regular Expressions
312809 [hema@an le i] Pls Any one Help...
312812 [phlip2005@gm] You have asked this question before; this might make some here concerned you

Rebuild all gems? (Or all which have native extensions?)
312813 [ninja@sl ph ] Ruby 1.9.0-4 instantly broke Hpricot. Reinstalling from the gem fixed it.
312815 [tim.pease@gm] You would need to write a script that dumps a list of your gems with
312818 [ninja@sl ph ] In which case, probably easier to just reinstall all of them.

mod_ruby and html headers
312819 [max.baroi@gm] cgi.body{<i>the text inside the body</i>}

how to avoid passing by reference and how to copy objects
312825 [adamtemporar] I first learnt C so used to being able to pass by reference or by value.
+ 312827 [jgabrielygal] The problem with the above approach is that an array holds also references
| 312927 [adamtemporar] thanks everyone for that.
| 312928 [etaern@ya oo] Here is a little example
| 312930 [adamtemporar] thanks lex for that.
| + 312936 [B.Candler@po] Roughly. The Array itself exists on the heap independently of a and b; a and
| | 312937 [B.Candler@po] True. But in Ruby you're not passing values by reference; you're passing
| + 312958 [dblack@ru yp] See my earlier post, and Brian's last one. It's not pass by reference;
|   312965 [fxn@ha hr f.] Nevertheless C is only pass by value. That could help.
|   312966 [fxn@ha hr f.] Sorry I messed up the wording, I mean there's no way some_function can
|   312969 [fxn@ha hr f.] Perl is only pass-by-reference by the way, sometimes it helps to see a
+ 312828 [tpreal@gm il] case a bit.
| 312840 [B.Candler@po] That's one of the joyful aspects of Ruby, especially coming from Perl (am I
+ 312887 [shortcutter@] Well, it's actually an advantage because passing a reference is usually
+ 312888 [dblack@ru yp] I know this sounds pedantic, but I think it's really pass by value,

[ANN] dokkit 0.5.0
312831 [andrea.fazzi] dokkit version 0.5.0

[ANN] dokkit-slides 0.1.0
312832 [andrea.fazzi] dokkit-slides version 0.1.0
threads.html
top