327013-330811

326771-331114 subjects 327225-329885

^ How To? Set a watch breakpoint on a constant or variable
327013 [byrnejb hart] How does one watch a ruby constant or variable in rdebug so that if the

^ Scrubyt and selecting options
327019 [thebarge gma] Has anyone gotten this to work successfully?  When I try to run

^ Best way to encrypt/decrypt a word
327022 [ruby.student] I have the need to encrypt/decrypt a one word string. The encrypted word
+ 327023 [ibc aliax.ne] Even if the UNIX password is encrypted by the Ruby programm, if an attacker=
| 327028 [ruby.student] er
| + 327031 [ibc aliax.ne] d"
| + 327102 [shortcutter ] 2009/2/5 Ruby Student <ruby.student@gmail.com>
|   327118 [ruby.student] We have two AIX (IBM flavor of UNIX) servers, s1 and s2 for argument sake.
+ 327041 [djberg96 gma] Rotate the password in the file. Remember the rotation level. And
  327042 [petite.abeil] Cheers,
  327047 [eleanor game] Or at the other extreme use OpenSSL. You'll find RSA and DSA examples

^ Building 1.9.1 as universal binary on OS X
327034 [alex deletem] I'd like to build the recently released Ruby 1.9.1 as a universal binary
+ 327052 [adam.oddfell] More importantly, what's the output of these commands?
| 327054 [alex deletem] /Users/alex/bleed/bin/ruby: Mach-O universal binary with 2 architectures
| 328937 [adam.oddfell] Sorry, it took me so long to respond to this. If the 'file' command
+ 327067 [nobu ruby-la] Universal binary support was very incomplete and has been dropped.

^ irb and single quoted strings
327036 [byrnejb hart] irb(main):002:0> x = '--rails --exclude something_is_not_right
+ 327037 [fred lacave.] It's just the representation.  IRB always shows strings double quoted,
+ 327038 [tim burlyhos] You have it right, it's just irb that backwacks it in response.
+ 327039 [azimuth-ruby] \ is an escape character for strings. For example, using

^ [ANN] Full Ruport Book manuscripts now on Github
327048 [gregory.t.br] I'm happy to announce that my friend Chenoa Siegenthaler has converted
327088 [robert.dober] Hmm I got some problems but with the adapted rakefile and new
327103 [gregory.t.br] Looks like we hardcoded the path for image generation.  I won't be
327171 [rick.denatal] Hmmm, I tried myself on OS X Leopard, figuring I might be able to debug the
327172 [gregory.t.br] Thanks for checking it out.
+ 327173 [gregory.t.br] Sorry, that was pretty ambiguous.  I meant, I installed asciidoc
+ 327175 [robert.dober] 98 pages, affirmative, I had not had any time looking into it though :(
  327344 [rick.denatal] I got it to build, with images, and it's 103 pages.
  327348 [rick.denatal] As a follow-up, I forked the git hub repository and added two tasks to the
  327363 [gregory.t.br] Good stuff, I'll definitely pull in convert_all.   I might try to find
  327379 [rick.denatal] Okay the url is now
  327382 [robert.dober] Great job Rick! Just one question, would this patch for the Rakefile be useful?
  327384 [gregory.t.br] Yeah I plan to do that :)
  327394 [rick.denatal] I actually had it that way at first, but decided to not change too much at

^ Recursive directory rename problem
327050 [gregg yows.n] - trying to standardize on a naming convention for all of my
327075 [mike.gold.44] Dir.entries is not recursive; you want 'find'.  But it has to be a

^ Fixing Watir Problem, was Re: Watir is acting retarded
327058 [bpettichord ] Daniel,
327074 [djberg96 gma] Wouldn't hurt I suppose. It would probably be less confusing.
327849 [bpettichord ] Daniel,

^ sqlite3/activer record permissions problem (no ror)
327059 [ddjolley gma] I'm using Ruby and ActiveRecord in a web environment (no ror). The
327099 [wpdster gmai] My guess is that the sqlite database is owned by root (or by anybody other
327128 [ddjolley gma] Unfortunately, the database is owned by 'apache' and assigned to the
327138 [ddjolley gma] FWIW, I just got this working by making the directory that contains the
327303 [jeremy hineg] That would be because sqlite needs write permissions to the directory so it may

^ Method Precedence
327060 [aeldaly gmai] class Example
+ 327061 [phlip2005 gm] When the compiler first encountered Example, it plugged one() and the outer
| 327063 [julian coret] FYI, it's not a compiler, it's an interpreter.
| 327065 [phlip2005 gm] The terms "compiler" and "interpreter" have never been exclusive - ask a Lisper!
| 327072 [julian coret] Ah, okay. So Ruby is a compiled language is it?
+ 327062 [julian coret] What happens when you call the one method is it redefines the two
| 327064 [aeldaly gmai] I'm doing this as a learning experiment. I would have thought that
| + 327066 [phlip2005 gm] Yes - always think of the interpreter like a text caret skipping thru the
| + 327068 [julian coret] No
| + 327069 [julian coret] Yeah, it's as if you opened the class and redefined two... you're right.
| + 327071 [pjb informat] Yes.
+ 327070 [lists bertra] In case you just want to influence the e object, say
| 327073 [julian coret] Yeah that's a much better way to do it than instance_eval!
| 327076 [aeldaly gmai] Thank you all for a very informative thread.
+ 327105 [mike.gold.44] def inside def: "It's undocumented and should not be used nor touched."

^ Re: Watir is acting
327080 [tomcloyd com] meaning? (I know the word, but your usage seem obscure to me, so I don't

^ Offre tres interressante
327089 [succes344 gm] Bonjour

^ regex \s == \n???
327090 [tomcloyd com] I'm trying to remove extra spaces from a long string which has some
+ 327091 [stefano.croc] According to "The Ruby Programming Language", \s is equivalent to " \t\n\r\f".
+ 327092 [rubytalk che] Tom,
| + 327093 [tomcloyd com] Stefano, Joe - thank you! I'm only just getting into regex, so I get
| | 327094 [dblack rubyp] a.gsub(/[^\S\n]+/, " ")
| | 327174 [tomcloyd com] Thanks, David. I continue to be amazed by the depth of your knowledge,
| + 327109 [julian coret] Can't you use squeeze?
|   327139 [mark thomasz] Best idea yet. Might as well use a built-in, rather than reinventing
|   327143 [dblack rubyp] This message is in MIME format.  The first part should be readable text,
|   327160 [s.korteling ] Is that a 1.9.1 change? In 1.8.6 String#squeeze squeezes everything if
|   327162 [dblack rubyp] Sorry, my mistake. It does squeeze everything.
|   327189 [julian coret] Sorry, forgot the " " argument
+ 327095 [mark thomasz] A newline is a whitespace char. \s is the same as [ \t\r\n\f]. If you

^ Does something like pty for windows ?
327097 [zhujie2003in] In my work, I often have to control applications running on

^ Equivalent of  "click_no_wait" using win32ole and threads?
327098 [mbaruah spik] I have a watir script to download few files. In the script I am

^ Question - looking for library to use for query like code?
327106 [mmc_collins ] Can this be done with Ruby? (this may be a shot in the dark)
+ 327115 [jdmuys kleeg] cars = hash.new
+ 327116 [james graypr] Anything can be done with Ruby.  ;)
+ 327121 [w_a_x_man ya] data =3D Hash.new {|h,k| h[k] =3D []}

^ ruby win32api call getMenuItemInfo
327107 [tedbaker gma] I have successfully managed to implement the following apis
330811 [dooby d10.ka] Very late reply.

^ strange arrayfields behaviour
327111 [jdmuys kleeg] Here is a counterintuitive behaviour of the arrayfields.rb module.

^ iterating over two arrays simultaneously
327117 [jdmuys kleeg] James' solution to the previous question being so much better than mine (which I
+ 327119 [martindemell] array1.zip(array2) {|i,j| print "#{i} = #{j}\n"}
+ 327120 [james graypr] I think your solution was just fine.
  327124 [jdmuys kleeg] Yes indeed, quite a lot. Thanks to both of you.

^ Dynamically create an unknown number of arrays
327122 [shandybleu y] I need to create an unknow number of arrays on the fly (could be 1 array
+ 327127 [shortcutter ] You can say, or rather: write, that - but the effect would be
| 327133 [shandybleu y] I have done some digging around and this is what I have written down on
+ 327131 [bbxx789_05ss] apple, banana, strawberry
  327134 [bbxx789_05ss] Whoops.  No quotes around regex's in ruby, and that regex doesn't work

^ [QUIZ] Mathematical Image Generator (#191)
327126 [yahivin gmai] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ 327140 [sander.land ] The link to the example output is dead.
| 327153 [yahivin gmai] My explanation of function depth is also somewhat confusing. If anyone
+ 327338 [alex deletem] I think for a pure speed competition, we'd need a standard set of
+ 327603 [njus larshau] This is my first quiz submission. Any comments appreciated.

^ Special Hash Constructors
327129 [shortcutter ] we frequently do
+ 327136 [cmdicely gma] Rather than making class methods on Hash to create special hashes like
+ 327188 [julian coret] ha = {}
+ 327195 [overlord gmx] Why not
| + 327199 [micathom gma] I personally would appreciate a special constructor for Arrays.
| | 327240 [pit.capitain] I often use
| + 327204 [jgabrielygal] irb(main):001:0> def Hash.with_hashes
|   327205 [shortcutter ] Yes, probably.  I'm not religious about the names.  My point was simply=20
+ 327206 [transfire gm] I've been using the name #autonew for this last one.
  + 327208 [micathom gma] default.dup
  | 327257 [overlord gmx] I think that's special enough to have its own method.
  + 327221 [shortcutter ] Where's the point of the rescue clause?  The error will show up much
    327238 [transfire gm] Why would the error show later? It is just so one could pass a
    327250 [shortcutter ] The code block is not executed when you invoke Hash.with - hence there
    327262 [overlord gmx] The difference between the existing and the new generic is the

^ Recursive parallel readdir() with drb and slave libraries
327130 [john stoffel] I'm trying to write a ruby script to do a recursive descent, counting up

^ [ANN] tagz-4.6.0
327141 [ara.t.howard] NAME
327293 [cwdinfo gmai] p_{

^ How can an I use nonblocking I/O with openssl?
327144 [rubyforum gm] I am using ruby's imap library to connect to gmail via ssl.
327145 [tony medioh.] <snowstorm+rubyforum@gmail.com<snowstorm%2Brubyforum@gmail.com>
327169 [tony medioh.] If there's interest I can release Rev's nonblocking SSL support as a
327197 [rubyforum gm] I am very interested in as I need IMAP ssl to use non-blocking i/o.
327202 [tony medioh.] <snowstorm+rubyforum@gmail.com<snowstorm%2Brubyforum@gmail.com>

^ eval statement
327146 [runningwild ] Trying to switch a project of mine from python to ruby.  Love ruby so
+ 327148 [badboy heart] why do you want to use eval?
| + 327149 [runningwild ] I want my program to run user-supplied ruby code, and eval is the only
| | 327156 [dblack rubyp] Yes, but what does *that* mean? :-)
| + 327183 [julian coret] Why is eval evil?
| + 327191 [pjb informat] Why are you saying that eval is evil?
|   + 327193 [w_a_x_man ya] (def  f(e)
|   + 327198 [cmdicely gma] Without taking additional special care, restricting eval to the to a
|     327213 [pjb informat] Ok. In CL we say EVAL is evil because it cannot do some things, and in
+ 327150 [mike.gold.44] The thing to remember is that local variables are always determined at
| + 327151 [badboy heart] be careful when using eval in irb. It can lead to hasty conclusions (is
| + 327158 [dblack rubyp] Actually it can't tell whether it's a method or a variable, so you
| | 327180 [mike.gold.44] No, that error message comes from rb_method_missing(), i.e., it was
| | 327181 [mike.gold.44] Or even better,
| | 327184 [dblack rubyp] []
| | + 327203 [tomcloyd com] That's known as "state dependent learning" (but maybe you already know
| | + 327242 [mike.gold.44] Yes, in 1.9 the local table is inside the parser, and a new parser is
| |   327267 [dblack rubyp] I'll stop trying to make that particular point, which is simpler than
| + 327295 [albertschlef] Yeah. That's why debuggers list local varibales even before we arrive at
|   + 327325 [mike.gold.44] I can't pinpoint where the misunderstanding is.  The _contents_ of 'a=2'
|   + 327328 [dblack rubyp] if false
+ 327152 [gwtmp01 mac.] Because eval creates a new nested scope rather than sharing the
  327157 [runningwild ] Ok, I see that now, good to know.  Now I have another question.  I want
  327168 [cmdicely gma] You can get a binding from any object that has a method to tell you
  327170 [runningwild ] Interesting.  Someone else has shown me a similar way of getting a fresh
  327182 [cmdicely gma] The code being eval'd can, as I understand, do anything that a method

^ Unlimited Wii Downloads! Wii Games, Wii Music & Much More!   
327154 [ cb1 1dis.cn] Unlimited Wii Downloads! Wii Games, Wii Music & Much More!

^ Eurionize - something PDF::Writer and PostScript libs might like
327155 [djberg96 gma] In short it marks a postscript doc so that it can't be copied by most

^ NVHOST Website Design & Custom Programming Supports Cancer Charities
327159 [shopbeenvied] NVHOST.com wants to make the world a better place! We will donate 10%

^ is this an issue for a Ruby installation process (warning: assignment  discards qualifiers from pointer target type)????
327163 [greg.hauptma] I'm on RedHat linux and installing Ruby but do get several warnings
+ 327178 [TimHunter nc] It's just a warning. Depending on the gcc options you use you get more
+ 327179 [TimHunter nc] It's just a warning. Depending on the gcc options you use you get more

^ can not install RubyGems (uninitialized constant YAML::Syck::DefaultLoader  (NameError))
327164 [greg.hauptma] I think I've upset my ruby/gems on my Redhat Linux box (I did an

^ Re: can not install RubyGems (uninitialized constant 
327165 [greg.hauptma] PS.  I noted I have a few matches for 'ruby'.  Not sure if this is

^ [help] Ruby execution on XP machine: Access is denied
327166 [m.pedriale g] I need some help on a strange error I'm getting when I try to execute
327228 [rogerpack200] It does sound like a permissions setting, or it sometimes happens when
327276 [m.pedriale g] Thank you Roger, I checked my firewall software (Comodo) event log and I

^ RubyGems
327167 [ron.green gm] I recently upgraded to Ruby 1.9.1 and I have noticed quite a few blog
327177 [bdimchef wie] Your gems are stored separately for different ruby versions.  If you

^ barby and more than 72 ppi
327185 [lis222 wp.pl] I need your help.
327289 [toredarell g] Usually you shouldn't have to set the PPI of an image - see

^ [ANN] openssl-nonblock 0.1.0
327201 [tony medioh.] I've seen various requests for non-blocking OpenSSL support.  As a
327264 [aaron tender] Have you submitted patches to ruby-core?
327268 [tony medioh.] Not as yet, I decided I'd go through the few hour process of releasing them
327299 [aaron tender] My OpenSSL patch was accepted in less than 24 hours....

^ do I need "ruby-libs" as a prerequisite to install/run ruby? what is  "ruby-libs" exactly?
327207 [greg.hauptma] If I'm downloading the ruby source to compile on my Redhat linux box, do I
+ 327209 [greg.hauptma] 2009/2/7 Greg Hauptmann <greg.hauptmann.ruby@gmail.com>
+ 327210 [stefano.croc] =46rom the name, I'd say ruby-libs is a package for your distribution. If y=
  327211 [greg.hauptma] 2009/2/7 Stefano Crocco <stefano.crocco@alice.it>
  327212 [stefano.croc] I think that they're normal. If I remember correctly, when configure finds

^ Module#=== vs Object#is_a?
327215 [peter.fitzgi] Could somone explain the subtle difference between Module#=== and
+ 327217 [stefano.croc] Looking at the ri documentation for the two methods, I'd say they do exactly
+ 327218 [micathom gma] === is used in case statements and can be overridden in subclasses.
+ 327219 [dblack rubyp] They're the same, in essence. === is bound to the C method rb_mod_eqq,
+ 327280 [gooigpi gmai] The Class class defines === operator in such a way that it can be used
| 327282 [peter.fitzgi] I love it!
| 327286 [dblack rubyp] Yes, it wasn't an accident :-) It's in keeping with the purpose of
| 327318 [robert.dober] Although I am a big fan with using #=== (for fingerlazyness) I have to
| + 327320 [dblack rubyp] I don't think it's the right approach to learning, though. I'd rather
| | 327337 [robert.dober] Actually the 'though' was here because we do not agree on the special
| | 327339 [dblack rubyp] I'm not making a pronouncement that no one should ever see an
| | 327342 [robert.dober] Thank you David
| + 327495 [no spam.plea] Sorry I came late to this party. I agree, and I can tell you why.
+ 327445 [b.candler po] case regexp_or_string

^ (none)
327216 [alperkirim y] unsubscribe=0A=0A=0A      _________________________________________________=

^ 1.9.1 - some gems not added to LOAD_PATH?
327222 [johans gmail] I'd like to be educated a bit on how rubygems in 1.9-p0 works together with

^ cannot remove multiple spaces
327223 [tomcloyd com] I'm baffled by this strange outcome - I cannot reduce multiple spaces
+ 327229 [cdemyanovich] See comments below.
+ 327274 [w_a_x_man ya] puts IO.readlines("data2").map{|line|
  327275 [w_a_x_man ya] puts IO.read("data2").gsub( /<(h\d)>/, '\1. ' ).gsub( /<\/h\d>/, "").

^ Ruby vs Perl performance
327224 [vetrivel.bks] I have downloaded perl and ruby program in net.I run both the
+ 327233 [peterhi ntlw] Can't be done. Unless you intend to build your own super fast vm.
| 327253 [radek.bulat ] nce
| 327349 [charles.nutt] Nice :)
| 327351 [sean smo.uhi] Sean Mehan
| 327376 [charles.nutt] - Charlie
+ 327245 [rogerpack200] Try ruby 1.9?
+ 327251 [radek.bulat ] Try it with ruby1.9.1. I get about 1.90s for perl and 2.80s for
| 327300 [reid.thompso] running on core2 duo gentoo
| + 327301 [reid.thompso] #!/usr/local/bin/ruby
| | 327614 [w_a_x_man ya] 0.0400575999999999 on my laptop with 2GHz Pentium.
| | + 327629 [reid.thompso] On same box using all C.
| | | 327652 [w_a_x_man ya] To make timing more accurate, let's calculate the set 100 times
| | | + 327750 [w_a_x_man ya] GB
| | | + 327880 [Reid.Thompso] Echo delay is 2s and 23737us
| | | + 327885 [Reid.Thompso] mono + F# = 3.919404  ( hits 3.9x... range consistently)
| | + 327639 [w_a_x_man ya] Using the built-in type complex makes the program shorter but
| |   327684 [reid.thompso] as info -- pulled down and configured F# et al on my box.
| |   327687 [reid.thompso] not very familiar with mono/et al --- compiled with --optimize,
| + 327316 [radek.bulat ] I don't believe you :P. Show us the code. Did you use RubyInline or somethi=
|   327321 [reid.thompso] see post from 1:14 am --- rubyinline
+ 327259 [tim burlyhos] You're not going to make it run faster (not at this time anyway).  You
| 327296 [julian coret] Doesn't ruby 1.9 rub faster?
| 327302 [tim burlyhos] Not for that functionality comparing the two languages.
+ 327260 [gooigpi gmai] Ruby and Perl are two totally different programing environments and are
| 327393 [perrin apoth] =20
| + 327444 [shortcutter ] Chad, I generally agree, however...
| | 327471 [ninja slapha] I haven't done enough C to say for sure, but I loved Perl's OO. There
| | + 327483 [shortcutter ] It's not that I find it "ugly".  It's more that I find it hard to read
| | | 327489 [ninja slapha] Very true. Most CPAN modules manage it anyway, these days, but I agree
| | | + 327564 [shortcutter ] Well, everybody as they like. :-)
| | | | 327573 [ninja slapha] Ah, thanks. That should help.
| | | | + 327577 [gooigpi gmai] Could you be more wrong and further from the truth? Perl can not be
| | | | | + 327585 [ninja slapha] Granted...
| | | | | | 327637 [gooigpi gmai] Similarities exist because Ruby is OOPL, and supports much broader
| | | | | | 327651 [ninja slapha] Rip a method out of one class and apply it to another.
| | | | | | 327676 [gooigpi gmai] Indeed, all this can lead to anarchy and chaos, but that is your doing!
| | | | | | + 327678 [julian coret] Just let him have his pain!
| | | | | | + 327713 [ninja slapha] Exactly my point. So if I am allowed these things which can lead to
| | | | | | + 327722 [mike.gold.44] This is the most telling part of the voluminous stream of consciousness
| | | | | | | 327959 [perrin apoth] =20
| | | | | | + 327731 [perrin apoth] =20
| | | | | + 327727 [perrin apoth] =20
| | | | + 327725 [perrin apoth] =20
| | | | | 327738 [ninja slapha] Very true. However, templating as a part of the core language is perhaps
| | | | | 327960 [perrin apoth] =20
| | | | | 327976 [gooigpi gmai] (1)
| | | | | + 327981 [ninja slapha] Why am I still feeding this troll?
| | | | | | + 328062 [shevegen lin] Well David, sarcasm does not bode extremely well with written text.
| | | | | | | 328136 [perrin apoth] The sarcasm in question struck me as *incredibly* obvious and well
| | | | | | | 328300 [gooigpi gmai] Indeed, any logical premise is possibe until proven wrong. There are
| | | | | | | 328371 [ninja slapha] I'd be curious to know in what Ruby application a true==false or 2+2=5
| | | | | | + 328135 [perrin apoth] I think it's because, like me, you may still not be 100% certain whether
| | | | | + 328133 [perrin apoth] =20
| | | | + 327760 [shortcutter ] That's the first flaw of Perl's OO: you have the free choice to use
| | | |   327813 [ninja slapha] Why is this a flaw? In Ruby, everything's an object. On closer
| | | + 327797 [hramrach cen] Actually you sort of can except the binding is not permanent.
| | |   327818 [ninja slapha] No, I don't think so. I've tried in a method somewhat similar to yours,
| | + 327572 [robert.dober] Are you aware that Perl's MI via @ISA is probably the worst way one
| |   + 327732 [perrin apoth] via
| |   + 327740 [ninja slapha] I've been thinking about it for a bit, and no, I'm really not. Aside
| + 327487 [gooigpi gmai] I am saying nothing of that kind!?
+ 327277 [w_a_x_man ya] Don't indent so deeply.  It makes the code much harder to read.
| + 327283 [gooigpi gmai] OCaml, Ada, C, C#, Perl, French ... I think all of these things are
| | 327285 [w_a_x_man ya] "one" is singular, so it's "best meets his".
| | 327292 [nico.bonada ] Posted via http://www.ruby-forum.com/.
| | 327590 [perrin apoth] it is unacceptable to a great many readers either to resort to
| + 327284 [w_a_x_man ya] let bailout = 16.0
|   + 327287 [gooigpi gmai] As I said, rather misplaced discussion. This is about Ruby, not about
|   | 327591 [perrin apoth] =20
|   + 327326 [julian coret] You could also look into The project to concert ruby to obj-c which is
|     327592 [perrin apoth] =20
|     + 327616 [reid.thompso] i googled, but couldn't find anything -- if you happen to run across it pls ping
|     | 327633 [zac zacbrown] I could be entirely wrong on this, but http://macruby.org seems to
|     + 327688 [julian coret] Yeah it's macruby
|       327733 [perrin apoth] Thanks.  I'll look into it.
+ 327281 [thopre gmail] choose the right tool for a job!
+ 327312 [dylan.star g] It's a tortoise and the hare debate really. As a C programmer i can say that
+ 327643 [w_a_x_man ya] I think that this should be 4.
threads.html
top