264637-374548

264423-316121 subjects 264887-336803

Class Instantiation
264637 [b3.pwns@go g] I have a few questions about class instantiation.
+ 264639 [dougal.s@gm ] names.each do |n|
| 264641 [dblack@ru yp] 1.times do
| 264642 [b3.pwns@go g] This was going to be my next question.
+ 264640 [promos@bu ch] You can, but it might be better to do something like this if you have
+ 374548 [steveausten5] information from your post. Really appreciate your work.!! It was

Ruby Paypal library uninitialized constant error
264643 [killertoaste] I'm trying to use the paypal library for ruby but im getting an error on
264725 [killertoaste] i managed to fix this by adding require 'money' into the

IPSocket::getaddress problem
264647 [h4z3@th -c r] Hey guys, I want to test if IPSocket::getaddress('address') is valid
+ 264655 [h4z3@th -c r] *BUMP*
+ 264660 [dangerwillro] Try creating a test first.
+ 264670 [rogerpack200] success = false

String parse
264650 [anitawa@gm i] I want to be able to parse a string and put them into variables.
+ 264652 [james@gr yp ] => "Menu: steak_and_egg | date: 0814 | who: Anita"
| 264675 [vjoel@pa h. ] Might be more general than is needed. If you know in advance that the
| 264778 [anitawa@gm i] Thanks, just what i was looking for
+ 264761 [o.renaud@la ] # parse with : and | as delimiters

[ANN] Swiftiply 0.6.1 Released
264657 [khaines@en g] Swiftiply is a fast backend agnostic clustering proxy for web applications

How can I define UNION in ruby?
264661 [wzfg@si gt l] I'd like to know how can I define UNION in ruby?
264663 [logancapaldo] ...

LoadError - Mechanize, Hpricot (gems)
264671 [killy971@gm ] I've been trying to install and use Mechanize ( http://rubyforge.org/projects/mechanize/
264691 [alex@bl ck e] Is Hpricot installed?
264698 [killy971@gm ] Yes it is.
264786 [stefan@ma li] Shouldn't you use ruby (3) for a cygwin install?
+ 264797 [killy971@gm ] I didn't know, until know it seemed to work when I was using mswin32
| 264985 [stefan@ma li] I'm not 100% sure about the facts or the wording, so take this with a
+ 264798 [killy971@gm ] Thank you very much !

Documenting Ruby (Was: TCPSocket Flushing)
264679 [drbrain@se m] See ruby-doc.org and the mailing list at ruby-doc@ruby-lang.org.

date array parse
264681 [globyy3000@h] if i had a huge array of dates in the format of ##/##/## how would i use

[QUIZ][SOLUTION] Cellular Automata (#134)
264683 [jamesbkoppel] Here's my simple solution. Note that, rather than parsing options, it merely expects rule, steps, state in that order.

Random case chars?
264692 [h4z3@th -c r] Does anyone have any good ways of transferring a string to random chars?
+ 264693 [stefano.croc] def rand_case str
+ 264695 [fxn@ha hr f.] "foobar".gsub(/./) do |c|
| 264801 [botp@de mo t] #    "foobar".gsub(/./) do |c|
+ 264696 [lists@be tr ] "--hello--".gsub /[a-z]/i do |x| rand(2)>0 ? x.downcase : x.upcase end
  264697 [h4z3@th -c r] Sweet that helped a lot, thank you all

How to forbid auto-redirections in open-uri?
264694 [iouniuniu@gm] ...

dot matrix printer !
264701 [gugui_sarubi] anyone knows a class to print in a dot matrix printer on Linux ?
264718 [znmeb@ce ma ] As long as there are "printer drivers" for the dot matrix printer in

ruby-debug: 1) @-sign,  2) v i <object>
264702 [a99.googlegr] when using ruby-debug ( _not_ the standard debugger coming with Ruby),
+ 264706 [martin.kraus] "v i <object>" list instance variables of the <object>
| 264710 [a99.googlegr] Ahh, nice, this works! Thank you!
+ 264708 [jan.svitok@g] On Slovak keyboard, @ is typed by AltGr (the right Alt) with V. Try
  264711 [a99.googlegr] unfortunately, this doesn't work with ruby-debug, at least on my side.

How do you choose a random word from an array?
264705 [small.busine] I'm trying to choose a random word from a given array. A little
264707 [stefano.croc] christmas_bin[rand(christmas_bin.size)]
+ 264709 [small.busine] You're the best, Stefano! Thank you so much!
+ 264754 [coder68@ya o] irb(main):001:0> class Array
  264809 [logancapaldo] ...
  264894 [coder68@ya o] That's much more cohesive! Thanks for the tip..

Lone Star Rubyconf - Last Call for Early Registration
264712 [jim@fr ez .o] Announcing a Ruby conference as big as Texas!

RubyConf registration?
264713 [lists@so rc ] Guys,
264714 [dblack@ru yp] We want to finish the talk proposal process (please everyone, submit
264715 [celtic@sa ry] That's http://proposals.rubycentral.org :)
264717 [dblack@ru yp] Thanks!

UTF-8 encoding with BOM under Ruby 1.8.x (Windows)
264721 [ed.odanow@wo] Moin, moin!
+ 264734 [rking@pa op ] ((%w(moin)*2).join ', ').capitalize+'!' # DRY principle.
| 264751 [ed.odanow@wo] There is no problem with workarounds - my question is related to the
+ 264771 [nobu@ru y- a] IIRC, no such change has been made in 1.9.
  264857 [ed.odanow@wo] ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
  264862 [nobu@ru y- a] Sorry, I've forgotton that I added it 2 years ago, setting

ANN: Sequel 0.1.9.7 Released
264722 [ciconia@gm i] Sequel version 0.1.9.7 has just been released. This release includes a

wsdl2ruby help
264723 [Kelsen23@gm ] I've been trying to figure out if and what I need to modify to get
264732 [felipe.contr] You might have better luck in http://groups.google.com/group/soap4r

[ANN/ADV] Intro to Rails, Alexandria, VA, October 9-12
264729 [dblack@ru yp] I'm happy to announce that I'll be teaching a four-day introductory

Re: Cellular Automata (#134)
264731 [ymendel@po o] #!/usr/bin/env ruby

[ANN] Gosu 0.7.4
264735 [julian@ra ch] I am happy to announce the release of Gosu 0.7.4, which is already
+ 264736 [martindemell] Did the crashing under linux ever get fixed? I really liked the
+ 264769 [vjoel@pa h. ] The link to the fmod DLL on

Singleton or full static class
264737 [lolz.llolz@g] In other languages I'm using the singleton pattern when I need a
+ 264740 [dblack@ru yp] There's no one answer to that (except I tend to frown on class
+ 264741 [andynu@gm il] ...
+ 264743 [ruby@an hr p] The Singleton pattern is usually a design mistake anyway. See
  264766 [shortcutter@] I find that article is not a good source on the usefulness (or

Re: Is there a thread safe implementation of a priority queu
264739 [lolz.llolz@g] I already searched myself and I came upon the "rbtree" queue, too but I

Re: Gosu 0.7.4
264745 [julianraschk] I don't think the bug was fully tracked down back then, but I think it
+ 264758 [thomas.mackl] Great news.  Andrea Wright gave an excellent talk on Gosu (and other
+ 264764 [dangerwillro] Is the Boost library required for using Gosu in Ruby?
| 264773 [julianraschk] If you are using Linux, Boost (along with the other libraries listed
| 264774 [dangerwillro] Good to know.
| + 264781 [julianraschk] Gosu uses each system's (sort-of) native API: Cocoa, Win32 or X11,
| + 264782 [julianraschk] sorry, just double-checked: with the wrapper .app, there still won't
+ 264765 [martindemell] Will test it on Gentoo and report back when I get a free moment.
  + 264772 [julianraschk] thanks for pointing this out! The FMOD team sure had a bad timing for
  + 265356 [julianraschk] I plan to release 0.7.5 soon to fix minor bugs and annoyances (esp.

HTTP headers and source
264749 [h4z3@th -c r] Ok guys, lets say i wanted to grab the source for google.com or
+ 264750 [fwmailinglis] charset="US-ASCII"
+ 264767 [rking@pa op ] Firefox + LiveHTTPHeaders - http://livehttpheaders.mozdev.org/installation.html

[ANN] smugmug 0.0.1
264753 [boumenot@gm ] I am happy to announce the first release of smugmug.  A ruby library for

Where can I find eval rules for ruby?
264755 [dmehrtash@gm] ...
264759 [phlip2005@gm] DSL is a state of mind, not a language inside a string inside a language.

Ruport::DataSet unitialized constant?
264770 [globyy3000@h] even runnin the simplest program such as this -
264790 [stefan@ma li] Well - Ruport::DataSet does not exist - take a look at

Unit tests and destructive methods
264779 [bulliver@ba ] As my flac library approaches 1000 lines of code I decided it would be prudent
+ 264780 [tim.pease@gm] Cheers!
+ 264810 [drbrain@se m] require 'fileutils'
+ 264851 [alex@bl ck e] In addition to the other suggestions, you could write to a StringIO
+ 264960 [bulliver@ba ] Thanks everybody. I will play with these suggestions and see what I can come

mp3 file  magic number identification
264783 [dangerwillro] Does anybody know how to identify (validate) mp3 files (other audio
+ 264791 [stefan@ma li] does this help: http://raa.ruby-lang.org/project/filemagic/
| 264814 [dangerwillro] Thanks Stefan, but I should have said, I was hoping for the pure Ruby
+ 264800 [adam.shelly@] = wave files start with the characters 'RIFF' followed by 4 bytes
| 264815 [dangerwillro] Thanks Adam, that's the kind of thing I'm looking for exactly.
| + 264825 [ben@bl yt in] If you're on a *nix system, you should have a "magic" file someplace
| | 264846 [dangerwillro] Thanks Adam, Ben, and others...
| | 264850 [ben@bl yt in] Do "man magic" (or possibly man 5 magic, or man -s 5 magic), and it
| | 264852 [dangerwillro] Yeah, I read that already. Seemed simple. Many file descriptions are
| | 264907 [ben@bl yt in] That's not a C thing, that's just general math.
| + 264965 [bulliver@ba ] The first 4 bytes of a Flac file must be 0x66, 0x4C, 0x61, and 0x43,
+ 264871 [felipe.contr] So first byte should be 0xFF, second byte & 0xFE should equal 0xFA.
  264909 [ben@bl yt in] Actually, ID3v1 tags go at the end of the file, ID3v2 tags go at the
  264933 [dangerwillro] That's one point I was definitely concerned about. Some sites
  264937 [ben@bl yt in] Yeah.  MP3s are complex :)

newby: class getter proper use help
264787 [weathercoach] I'm an aspiring ruby hobbyist.   I've finally got my head around
264789 [dblack@ru yp] attr_writer :user

Re: class_eval do {nothing}?
264788 [dblack@ru yp] class C

Re: Creating and passing a block in a C extension
264792 [TimHunter@nc] I think rb_iterate() will do what you want.
264841 [gerardo.sant] Thank you Tim, that function is what I was looking for.
+ 264889 [rmagick@gm i] On Aug 16, 1:00 am, "Gerardo Santana G?mez Garrido"
+ 264892 [thomas.mackl] On Aug 16, 1:00 am, "Gerardo Santana G?mez Garrido"

watir with javascript?
264793 [schmode93@ya] I have been using the watir gem for a few days, and i have come across a
264816 [pmr16366@gm ] you shoud post this to the watir group - http://groups.google.com/group/watir-general?lnk=srg
264829 [schmode93@ya] Sorry for not being specific enough :(. Ok i'll start off with what
264897 [kyleaschmitt] You can pass click events with Watir pretty easily.  As far as
265051 [schmode93@ya] Ok... right now.. i think I'm going insane or something????????????
265099 [kyleaschmitt] The $ infront of ie means it's global.
265197 [schmode93@ya] Well, i fixed it i was being a complete tard, and typed in ie.link, not

[ANN] stompserver 0.9.8 Released
264795 [lionel-subsc] stompserver version 0.9.8 has been released!

Trouble with RubyConf Proposal site confirmation email?
264802 [dblack@ru yp] At least a couple of people have had trouble getting confirmation

Problem with custom_require
264812 [its_conebred] So, for anyone who remembers, I had a post a while ago about not being

grep a csv?
264817 [globyy3000@h] If i had a huge CSV file, and i wanted to pull out say all the lines
+ 264818 [grzm@se sp t] <snip />
| 264819 [globyy3000@h] im planning to use ruport to graph the data, but if u can integrate the
| 264822 [cdcarter@gm ] Ruport uses FasterCSV for its CVS parsing.
+ 264820 [cdcarter@gm ] File.readlines('filename.csv').grep(/Blah1/)
+ 264821 [znmeb@ce ma ] OK ... first of all, define "huge" and what are your restrictions? Let
  + 264824 [w_a_x_man@ya] Windoze has a command-line.
  + 264826 [globyy3000@h] lol, alright lets say the senario will be in the range of 20k - 70k
    + 264828 [alexg@ku cr ] Array#<< appends the object onto your Array, you want to combine the
    | 264832 [globyy3000@h] can i push that into a file to temporarily use to pull all the Blah1
    | 264840 [alexg@ku cr ] Sure, use tempfile, but I think botp has shown why you don't really
    | 264843 [globyy3000@h] the reason im going to use a tempfile is because thers going to be a
    | 264860 [Christopher.] Not sure if this is what you are looking for, but if you are trying
    | 264864 [botp@de mo t] #   require 'rio'
    | + 264867 [Christopher.] Never. Examples that assume I have a file small enough to load into
    | | 265031 [botp@de mo t] # > simply amazing. btw, how does rio handle big files, does it
    | + 264984 [globyy3000@h] it seems things have been amped a few levels of complication since my
    |   265035 [Christopher.] You are right, that was a poorly thought out regular expression.
    + 264833 [botp@de mo t] # inside ruby of course, no command line program > output.csv   :)
    + 264853 [alex@bl ck e] There's a problem with using File.readlines that I don't think anyone's
      + 264916 [kaldrenon@gm] I guess the following is slightly OT, since the OP is talking about
      | 264922 [alex@bl ck e] If you ignore that the quote character can also appear inside column
      | + 264931 [kaldrenon@gm] That's very cool, granting that there are still a number of conditions
      | | 264947 [phrogz@ma .c] /,+/     # matches one or more comma characters
      | + 264953 [w_a_x_man@ya] I think that this will work correctly with any complete csv record.
      + 264950 [w_a_x_man@ya] to extract a record from the csv file, continue reading lines
        264954 [w_a_x_man@ya] The "chomp" is a mistake.

excessively verbose request for help with regex and arrays
264827 [significants] cover/back, and figure out the innards of the aimlog
+ 264830 [drbrain@se m] Well, you haven't explained what you really want to do with your data
| 264837 [significants] thanks, but since the time is only going to be used for arithmetic
| 264842 [alexg@ku cr ] Does this help?
| 264844 [significants] yes, this helps a lot! I should have assumed that parsing the time
+ 264835 [alexg@ku cr ] I'm not sure I fully understand what you want to do, perhaps you

removing quotes in a string
264831 [grace@wh st ] (") in a string please?
+ 264834 [has.sox@gm i] ...
| + 264845 [grace@wh st ] Thanks for all that everyone. I'm a bit lost after a whole afternoon of
| | 264854 [phil.meier@g] csv_rows.each do | row |
| + 264855 [botp@de mo t] # string.gsub( /\A"/m, "" ).gsub( /"\Z/m, "" )
+ 264836 [botp@de mo t] # Hi, does anyone know of a good way to remove leading and
+ 264839 [vjoel@pa h. ] s = "\"foo bar\nbaz\""
+ 264847 [skye.shaw@gm] Good as in terse, good as in fast, good as in creative...?

Ruport GraphReport
264848 [globyy3000@h] this is rather a followup from my other post...in the attempt to try and
264856 [alexg@ku cr ] No offence, but there are a lot of problems with the script you
265018 [globyy3000@h] lol alright that worked out pretty nicely, but how would i align the 24

trouble with tk84.dll
264858 [pushist_ik@t] Please help to young beginning ruby programmer from Belarus.
265062 [pushist_ik@t] I still need your help!!!

[ANN] igraph 0.3 Released
264865 [alexg@ku cr ] igraph version 0.3 has been released!

Calling JRuby from Ruby.
264868 [evilgeenius@] Whats the best way of running a JRuby script from Ruby?
264869 [robert.dober] Hmm are Ruby and JRuby drb compatible? Maybe that would do the trick for you?
264979 [robert.dober] I just downloaded JRuby 1.0, JRuby as Server or client, Ruby as client
265962 [evilgeenius@] DRb is the answer and it does work like a charm!!
265963 [evilgeenius@] So now i can have a jruby drb server purely dedicated to just creating

how can I update a span in the HTML(page)?
264874 [wzfg@si gt l] I'd lo=ike to knwo if I can update a span in the html, in C#, I can do
264896 [phlip2005@gm] Install Ruby on Rails, and use <%= button_to_remote %> there. Same

Re: # helf: Symbol as array index
264875 [nick314@gm i] ...

Relationship operator for classes
264876 [ronald.fisch] I wanted to distinguish between cases, where a variable
+ 264878 [celtic@sa ry] This is just by my own experimenting, but it seems === is for testing
+ 264879 [stefano.croc] You need
| 264881 [ronald.fisch] Thanks a lot, that was it!!
+ 264880 [celtic@sa ry] So on second thoughts, try just removing the ".class" from that code and

threads and puts
264877 [esandin@gm i] Thread.new do
264932 [pubsub@ru yi] It's a bit surprising that it outputs anything at all! If the above is
264968 [esandin@gm i] Thank you all, this makes it all much more understandable!

Threads and loops
264882 [esandin@gm i] loop{
+ 264883 [lionel-subsc] You don't wait for the Thread to stop to exit your program.
+ 264884 [lparravi@gm ] When your program exits, the thread dies. Take a look at Thread.join

Won't WIN32OLE_EVENT.new leak?
264885 [nikolai.weib] Won't WIN32OLE_EVENT.new leak?  A WIN32OLE object will sooner or later
265101 [masaki.suket] WIN32OLE_EVENT object is freed when ruby process terminated.
265469 [nikolai.weib] Can't the WIN32OLE_EVENT object be linked to the WIN32OLE object so
265486 [masaki.suket] Thank you. It seems to me that your suggestion is good solution.
265507 [nikolai.weib] OK.  I'll see if I can come up with a patch as well.  I solved the
266084 [masaki.suket] I noticed that backword compatibility would be lost if
threads.html
top