300157-318868

299953-303833 subjects 300351-301333

^ Search string for occurneces of words stored in array
300157 [johnnybutler] I have a sentence "This is my test sentence" and an array["is", "the",
+ 300163 [cmdjackryan ] How about '["is", "the", "my"].each'?
| 300171 [jens.wille u] sentence, words = "This is my test sentence", ["This", "is", "my"]
| + 300172 [jens.wille u] ok, i withdraw my post. david's just quicker... ;-)
| | 300173 [dblack rubyp] Yeah, but yours is cooler because you remembered Regexp.union :-)
| | 300175 [jens.wille u] ha, didn't know that ;-) thank you!
| + 300208 [shortcutter ] I'd rather do it the other way round, i.e. iterate over the sentence and
|   300209 [dblack rubyp] "This is my test sentence".scan(/\w+/).any? {|w| words.include? w }
|   300210 [shortcutter ] Yes.  I used to_enum(:scan,/\w+/) because in this class of problems the
|   300249 [shortcutter ] Well, I did a little benchmarking and it turns out that I probably spoke
+ 300167 [dblack rubyp] You could use any?
| 300213 [dblack rubyp] Actually, sentence.include?(word) isn't good, because it will give
+ 300177 [kbloom gmail] Ruby quiz #103: the DictionaryMatcher
+ 300181 [rogerpack200] I'd write my own
+ 300278 [albertschlef] "This is my test sentence".split & ["This", "is", "my"]

^ Re: All occurances of a character in a string
300185 [list.push gm] Here is one way.
300192 [adam.shelly ] I thought of the 'indexes' method, but that works in reverse.  So I

^ Noob Q: ruby block scoping question (ruby TK)
300193 [psaeli zorod] I've just recently been getting to know ruby and the ruby Tk library and
300200 [vjoel path.b] That's a really good question.
+ 300230 [psaeli zorod] Thanks, Joel!  You gave me just what I needed to begin to understand
+ 300306 [albertschlef] Is it possible to do 'w.configure ...' instead of '@btn.configure ...'?
  300309 [vjoel path.b] Sorry, bad example. Thanks for pointing that out. It should really be w.

^ Re: Array#first is not Array#
300194 [albertschlef] I'm using some other scripting language (PHP), and when it becomes known

^ Why can't I rescue OLE Exceptions?
300196 [dcparker gma] I've had this problem consistently over the past year and just now I
300197 [avdi avdi.or] Can you post a simple example that exhibits this behavior?
300255 [dcparker gma] Ok, sorry, I figured out why I was getting the odd behavior... first of

^ Need help converting PHP to Ruby / eRuby
300198 [creabosl gue] I am new to Ruby / eRuby templating and need some help converting from
300206 [jan.svitok g] try using ENV['SCRIPT_FILENAME'] or $0 instead of __FILE__.
300211 [lmv314 gmail] Jano,
300223 [justincollin] I think the more typical way to do this is more like
300348 [lmv314 gmail] Justin,
300377 [jan.svitok g] <%

^ gems and superuser rights
300201 [AEtzold gmx.] Dear all,
300220 [dan danfinni] sudo gem install <gem_name>

^ Install Error rjb gem
300203 [bwacjay gmai] I've spent two good(bad, actually) days on this already, and searched
300233 [cmdjackryan ] Well, unless you have Visual C++ 6.0 installed, you won't be able to
301550 [shane digita] I'm running into the same issue. Are there any other better
+ 301551 [shane digita] gem install rjb -v 1.1.2
+ 301554 [cmdjackryan ] Build Ruby with MinGW32, following the recipe posted by Luis[0]. You'll
  301555 [shane digita] In my opinion an easy install is the highest priority for
  301563 [cmdjackryan ] Installing a build system for Java applications on a non-Java Ruby. Hmmmm..

^ Re: Typed ruby
300204 [jkauzlar hot] Arlen,
+ 300205 [jkauzlar hot] Not as likely to happen as giving the wrong parameter type, IMO.
| 300218 [znmeb cesmai] Despite what many people say about it, Java is an exceptionally
+ 300207 [dblack rubyp] Which do you mean: types, or classes? :-)
+ 300238 [drbrain segm] I find I have this problem less the more readable (as English) my code
  300294 [rick.denatal] Truth be told, I think that this actually is evidence that delete

^ [ANN] Nebular Gauntlet 0.6
300214 [steviedizzle] A new release for Nebular Gauntlet for the first time in quite a while.

^ Ruby 1.8.6 (i486-linux)
300215 [roycstannard] First post here, I hope this is the right forum :)
+ 300216 [keletmaster ] I believe that Ubuntu compiles all packages for i486 so that people do
| 300228 [roycstannard] The only compiling I've done in Ubuntu is with ffmpeg which was pretty
| 300231 [cmdjackryan ] Compiling Ruby on Ubuntu isn't trivial. But searching the web for
| 300371 [roycstannard] Thanx to all for the helpful advice.
+ 300229 [cmdjackryan ] As Kyle pointed out, you can probably find Ubuntu .deb files to install

^ How about the execution efficiency in Ruby 1.9?
300221 [hi.steven.tu] Has It been greatly improved?
+ 300224 [ara.t.howard] yes.
+ 300235 [micathom gma] How these charts relate to real-world problems ... oh well, but it's
| + 300247 [eleanor game] It's interesting to see that Ruby 1.9 is now faster than Icon, which
| | 300291 [igouy2 yahoo] On May 1, 3:58 am, Eleanor McHugh <elea...@games-with-brains.com>
| | 300300 [eleanor game] Well there's lots of room for improvement in the Icon VM, what with
| | 300355 [znmeb cesmai] The main use of it that I'm aware of is in the build process for Norman
| | 300386 [eleanor game] Yes, I was very sad when the news broke as he was one of my personal
| + 300292 [igouy2 yahoo] Here's a direct comparison -
+ 300243 [overlord gmx] Yes!
  300257 [james graypr] I've always wanted to try that.
  300271 [overlord gmx] Well, rayt (that's its short name) is quite basic and limited, there are

^ ruby program for sql query
300222 [rereich27 ho] I am currently working on a database system that utilizes ruby on rails
300227 [cmdjackryan ] All you need to do is generate the appropriate controllers and views for

^ Rdoc link question
300234 [aquasync gma] Does anyone know how to have a named link in Rdoc simple markup with a
300236 [drbrain segm] Try {link label}[http://...]
300237 [aquasync gma] Thanks :). I was just in the middle of grokking the TIDYLINK regexps in

^ limiting the scope of a variable
300239 [thomas faun.] with a function like that
+ 300240 [ pm ubit.com] Why not just use methods?
| 300246 [thomas faun.] Inside the block, that is passed to function "let", many variables
| 300251 [shortcutter ] I had read Paul's reply a little differently: this was not about blocks
| 300270 [overlord gmx] But you can't pass arguments to the scope. Whatever that might be good
| 300282 [thomas faun.] Yes, that was my intention, especially with regard to Ruby 1.9 and its
+ 300242 [matt.mower g] The Invocation Construction Kit (Ick) gem includes a "let" function
| 300283 [thomas faun.] Sounds very promising, thanks! Seems that I'm not the first person
+ 300272 [ara.t.howard] the simplest way is to use instance_eval

^ Regexp help needed
300241 [bruno.bazzan] I have some text documents containing series of questions and answers.
+ 300263 [james graypr] I would probably do it without leaning on regular expressions in this
+ 300265 [yermej gmail] qa = "*1) Is this the first question ?
+ 300378 [bruno.bazzan] All the proposed solutions work perfectly !

^ メールの誤発信にご注意ください(お詫び)
300244 [freeparis2 g] 各位

^ inherited behaviour.
300245 [peter.morris] Folks, would there be any DOWNSIDE to the call to the parents INHERITED
+ 300253 [dblack rubyp] It would introduce a kind of strange disjunction between the method
+ 300286 [vjoel path.b] Ruby classes are never closed, so there is no significant point (2),
  300314 [ymendel pobo] There's only one inheritance point for a class, though. That the class
  300316 [dblack rubyp] That seems very arbitrary, though, in the sense that the superclass's
  300683 [ymendel pobo] It is arbitrary, but it makes sense if the method is called
  318862 [macarui gmai] inherited callback was called after the class was fully defined (with
  318868 [b.candler po] But it's never "fully defined", as it can be extended at any time in the

^ Preventing automatic hyperlinks in rdoc
300248 [emacs devrx.] How can I prevent rdoc from automatically hyperlinking to methods?
300275 [jan.svitok g] See http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/297786
300277 [emacs devrx.] Thanks!  I should have checked to see if there was a newer version of rdoc

^ CANNOT get Ruby to work with SQL
300250 [cornelombaar] Please can someone help me?
+ 300252 [cmdjackryan ] <http://abstractplain.net/blog/?p=973>, which mentions that you can
+ 300254 [cdemyanovich] Rails apps use a database configuration file,

^ Re: UTF-8 in Ruby
300258 [koflerjim ma] "str".utf8?

^ Ruby exceptions and YAML
300262 [rael zopyra.] I'm confused by how YAML seems to not work with ruby exceptions.  I
300264 [stefano.croc] It depends on the =3D=3D methods for the class in question. If you try the =
300266 [rael zopyra.] Thanks for the clarification, but that's really not the main issue,

^ splitting with a regex & keeping a ref?
300267 [kyleaschmitt] I'm writing some scripts to help handle some ornery samba servers we
+ 300269 [dblack rubyp] I'm afraid I can't quite follow that sentence. What do you mean by a
| 300273 [kyleaschmitt] David, back reference as in a regex back reference.
| 300274 [kyleaschmitt] Ohh right, desired sample output.
| 300276 [kyleaschmitt] David,
+ 300279 [yermej gmail] I think you might want scan instead of split.
| + 300281 [kyleaschmitt] yermej,
| + 300284 [shortcutter ] robert@fussel /cygdrive/c/Temp
|   300289 [kyleaschmitt] Robbert, yermej, David,
|   300295 [dblack rubyp] I know you're not asking for refactoring advice, but here's some
|   300303 [kyleaschmitt] David,
|   300313 [dblack rubyp] I don't know whether File.read is actually written in terms of
+ 300358 [w_a_x_man ya] regex = /(\[.*?\])/

^ Please explain nuances of ||=
300280 [twscannell g] I am reading some of the ruby files in rails and I an seeing the ||=
+ 300285 [kyleaschmitt] You're close on some, right on some.
| 300293 [twscannell g] Yes, Thank you,
+ 300287 [onepoint sta] There's a nice discussion at
+ 300290 [dblack rubyp] x ||= y means:  x || x = y
| 300305 [overlord gmx] No, it means: x = x || y
| + 300307 [shortcutter ] I believe you are wrong.
| | + 300315 [cmdjackryan ] You are wrong, too, though.
| | | + 300318 [dblack rubyp] The question, though, is what x ||= y expands to. Robert's point is
| | | + 300320 [twscannell g] Knowing ruby the way I do, I realize that she has lots of magical
| | + 300407 [overlord gmx] Well, the difference is that h[1] gets only evaluated once.
| + 300312 [dblack rubyp] This is becoming a bit of a perma-thread :-)
|   300317 [cmdjackryan ] x ||= y expands into x = x || y, since x == 1 expands to x = x + 1, and
|   300322 [dblack rubyp] I think you mean +=.
|   300326 [cmdjackryan ] Yes, indeed.
|   300328 [dblack rubyp] It depends what you mean by work :-) See Robert's example.
|   300331 [cmdjackryan ] As if. :P
|   300334 [dblack rubyp] class that showed the same behavior, but I can't remember the details.
|   + 300336 [cmdjackryan ] Well, it is unexpected if you forget about the default value for Hash,
|   + 300339 [vjoel path.b] vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
|     300344 [rick.denatal] In writing this article, I pulled my old dusty copy of Kernighan and
|     + 300380 [shortcutter ] Nice summary!  And, if you think about it from a usability perspective
|     + 300406 [overlord gmx] Eh, what? You are confusing me.
|     | 300412 [rick.denatal] Yes, that was a typo on my part, it should have read  "and x &&= y
|     + 300436 [pit.capitain] They obviously also differ if evaluating x has side effects as in
|       300455 [rick.denatal] But x is different whether its on the RHS or LHS
|       300470 [overlord gmx] Thanks a lot!
+ 300338 [freeparis2 g] Kazuo Ishii Ph.D., Tokyo Univ. of Science

^ Re: How do I embed a Ruby interpreter in my C program?
300299 [kthecm yahoo] Tell me please, what initialisation order and params are required for
300301 [jameskilton ] Embedding the Ruby interpreter isn't that difficult, but there are
300302 [jameskilton ] vm.run()
300391 [kthecm yahoo] Yes 'Rice' is quite impressive.
+ 300408 [jameskilton ] No, you cannot reliably run Ruby across threads. It's just not
+ 300421 [ snk gna.org] Yes this is possible.  The trick is to embed the *execution* of Ruby
  300425 [ snk gna.org] Since your target platform is Win32, I'm not sure whether you have the
  300461 [kthecm yahoo] Understood. Thank you.

^ Re: Is there any nomenclature for private methods?
300304 [ryand-ruby z] 1) makes testing easier / cleaner.

^ Is there some way to execute a block within an arbitrary lexical scope?
300308 [rubytalk pos] Is there some way to execute a block within a certain lexical scope?
+ 300310 [shortcutter ] robert@fussel ~
| 300329 [rubytalk pos] Let's say I'm doing some metaprogramming from another class and I want
| 300332 [ara.t.howard] then you will need to use continuations.
| + 300381 [shortcutter ] What exactly is this "something"?
| | 300446 [rubytalk pos] Robert,
| | 300499 [shortcutter ] Please do not top post.
| + 300451 [rubytalk pos] Ara,
+ 300491 [sean.ohalpin] there doesn't appear to be any form of block invocation that changes
  300493 [ara.t.howard] ingore me, i'm insane.  i was thinking of evil.rb.

^ [ANN] Vancouver Ruby Meetup - Merb - Off the Rails - May/5 @ 7pm - Join Us
300319 [geraldbauer2] Join us for the open and free to all Vancouver Ruby meetup on

^ Searching for latin/umlaut characters in string
300321 [johnnybutler] Ive read up a bit about uicode strings and the issues with rails after i
300323 [fxn hashref.] T24gVGh1LCBNYXkgMSwgMjAwOCBhdCAxMDo0NSBQTSwgSm9obiBCdXRsZXIgPGpvaG5ueWJ1dGxl
300383 [johnnybutler] No the string is coming in via a csv file.
+ 300385 [bbxx789_05ss] str = "My cafe\xcc\x81 is good."
+ 300394 [fxn hashref.] T24gRnJpLCBNYXkgMiwgMjAwOCBhdCAxMDoxNyBBTSwgSm9obiBCdXRsZXIgPGpvaG5ueWJ1dGxl
  300409 [johnnybutler] Its Ansii as far as i can tell.  Its actually coming from an excel
  300413 [fxn hashref.] T24gRnJpLCBNYXkgMiwgMjAwOCBhdCAyOjUyIFBNLCBKb2huIEJ1dGxlciA8am9obm55YnV0bGVy
  300427 [johnnybutler] Here is an example of the csv file with the word below and how it is
  300428 [fxn hashref.] T24gRnJpLCBNYXkgMiwgMjAwOCBhdCA0OjM4IFBNLCBKb2huIEJ1dGxlciA8am9obm55YnV0bGVy

^ parsing a file
300325 [adam masiare] A \t X1, X2 \t Z1, Z2
+ 300327 [fxn hashref.] input = <<EOS
+ 300349 [w_a_x_man ya] IO.foreach("data"){|line|

^ How to exec a module method when "include Module" from a Class ?
300330 [ibc aliax.ne] I need that when a C object is created a module M method is runned=20
300379 [ibc aliax.ne] MjAwOC81LzEsIEnDsWFraSBCYXogQ2FzdGlsbG8gPGliY0BhbGlheC5uZXQ+OgoKPiAgaXJiPiBj
300382 [sandro.pagan] You can try overwrite initialize method from the module
300392 [ibc aliax.ne] MjAwOC81LzIsIFNhbmRybyBQYWdhbm90dGkgPHNhbmRyby5wYWdhbm90dGlAZ21haWwuY29tPjoK

^ Re: Ruby script to run command as root on remote linux syste
300333 [jdinkel gmai] Ok, a little more testing, and I think I've found the problem.  This is

^ Did this stop working? Or did it ever work? (metamagic)
300335 [rabbitblue g] module Translator
300337 [mikael hoilu] You forgot the self. here. ``included'' is a module method.
300341 [rabbitblue g] *face palm*

^ DSL - class-level methods that affect instances
300340 [rabbitblue g] I'm having a problem of design. I've tried a few configurations of class
+ 300342 [kbloom gmail] Use class variables (the @@ variety).
| 300343 [rabbitblue g] That works! Except it shares translations across all subclasses.
| 300361 [kbloom gmail] I couldn't remember why I didn't use @@ variables for another very
| 300363 [dblack rubyp] I wish that class variables were $$ instead of @@. They're really a
+ 300346 [dblack rubyp] I'd say: don't think of it as any more of a barrier than exists
| 300364 [rabbitblue g] That helps, actually. Viscerally, for now, but I'm sure the fullness of
| 300368 [rabbitblue g] Here she is, best of both approaches!
+ 300396 [boss airblad] You might be interested by Active Support's class inheritable

^ ML Not taking off or skip command
300345 [glennswest y] I've tried a dozen times to do a off or a skip=0Ato the ctl address for the=
+ 300347 [cmdjackryan ] 'help' would've, well, helped. ;)
+ 300366 [matz ruby-la] I turned you off manually.

^ Re: compiling gsl for one-click ruby (sorta solved)
300350 [gavan.mcgrat] So was this ever done?  I can't seem to find the one click installer
+ 300359 [cmdjackryan ] Try the sandbox for the new, MinGW/MSYS based installer?
| 300365 [ara.t.howard] fwiw my installer was done on to of mingw, so this is quite possible.
| 300367 [cmdjackryan ] Hm, could you submit this patch to the OCI project? I'm sure these folks
| 300369 [ara.t.howard] it's been far too long for me to remember what i did - but the work is
+ 300362 [ara.t.howard] i've done it.
  300627 [gavan.mcgrat] Hey thanks.  Worked a treat.
threads.html
top