315093-315825 subjects 315461-316803

undefined method `element_name', dubble inherit
315239 [giel@de ek t] Dear all,

Marketing On Internet
315240 [marketingsre] The majority of people fail online. Why do so many people fail online?

rexml error
315244 [rakaur@ma ki] Any time it parses anything that has "xmlns:xml" defined, it spits out
315317 [mark@th ma z] REXML doesn't check to see what
315337 [rakaur@ma ki] That ticket is wrong. It's fine to define it as the default namespace.

at_exit handler *except* for fatal runtime error
315249 [synergism@gm] How do we execute a handler (I assume via at_exit) when a program
+ 315256 [aff28@de et ] Inspect the value of $! (or $ERROR_INFO) in your at_exit handler. This
+ 315264 [b.candler@po] "divide by zero" isn't a fatal error - you can catch it. But if you call
| 315293 [DAMisener@gm] In our particular case we are creating run-time at_exit{} handlers
| 315312 [ara.t.howard] you can do this
+ 315306 [shortcutter@] exiting
  315308 [DAMisener@gm] But out above example we want to suppress the  file rename for any
  315333 [shortcutter@] Oh, come on.  You can easily use that information to build what you want.
  315380 [robert.dober] Hmm maybe not Robert, my feeling is that they should not do what they
  315708 [DAMisener@gm] Actually inverting the logic isn't that easy (at least for me)
  + 315709 [ara.t.howard] there is : 'rescue'
  + 315710 [ara.t.howard] class TentativeFile
  | 315721 [DAMisener@gm] output=3DTentativeFile.new.open('temp.tmp','w')
  | 315729 [ara.t.howard] you've got to play with code at least a little!
  + 315722 [shortcutter@] It rather seems that you're making *your* life too hard. :-)
    315725 [DAMisener@gm] ideas e.g.

why one array continues to grow after repeated call
315250 [chen_li3@ya ] create a new array(b1) based on an existing one (a1).
+ 315257 [b.candler@po] I'm not sure why you expect that.
| 315271 [chen_li3@ya ] How come this loop happan? I don't want a loop here.
| 315284 [rick.denatal] ...
| 315543 [chen_li3@ya ] The script in the OP is a simple version of another more lenghy one.
| 315589 [b.candler@po] So if the idea is for method1 to initialize @a1, and for method2 to
+ 315259 [rick.denatal] ...
  315311 [rhkramer@gm ] I'm not the OP but I took a quick glance at the article.  Sometime when
  315326 [b.candler@po] It's crucial.  x[y] = z "looks" very much like some sort of an
  + 315329 [b.candler@po] Oh I forgot to add - while playing about with this in irb, the method
  + 315342 [rhkramer@gm ] ...
  | + 315347 [sepp2k@go gl] know
  | | 315419 [rhkramer@gm ] []=
  | | 315431 [b.candler@po] However, you can't in Ruby. "x = y" cannot be made to mean anything
  | | 315463 [rhkramer@gm ] object
  | + 315348 [b.candler@po] It just so happens that the semantics of the []= method on an Array
  |   315415 [rhkramer@gm ] 3,
  |   315432 [b.candler@po] []= is *never* an assignment.
  |   + 315435 [b.candler@po] Just one other thing. All this talk about []= has overlooked the much
  |   + 315464 [rhkramer@gm ] Wow!  That's either amazing or frightening (or both).
  + 315519 [rick.denatal] ...

Dbi Timeout expired Sql server 2005 using ADO
315260 [paqs140482@g] ...

eventmachine client server problem
315269 [bm2967@re if] My Server code is
315350 [justincollin] Maybe try using close_connection(true) or close_connection_after_writing.
315370 [bm2967@re if] No use.it is same even after using close_connection_after_writing or

why does this prog still stop after exception
315275 [junkone1@gm ] i thought i put enough exception handlers for the prog to continue
315278 [stefano.croc] If no exception class is specified, rescue only rescues exceptions derived

[ANN] Ruby Manor, now with confirmed venue and dates
315285 [james@la ya ] Firstly, apologies if you've already got this information, or aren't

short regexp question
315287 [fritz.thiele] short question how to use regexp the right way
+ 315289 [dblack@ru yp] b = a.delete("[b]")
| 315292 [fritz.thiele] thanks for quick answer. your code just works, if you know "b". I only
+ 315294 [b.candler@po] b = a.gsub(/\[b\]/,' ')
| 315296 [b.candler@po] a = "aaa[b]bbb[b]ccc"
| 315299 [fritz.thiele] thanks for your answer. as I stated to David, I just know about the
+ 315300 [sepp2k@go gl] "a[b]c".gsub(/\[.*?\]/, " ")
  315301 [fritz.thiele] thanks for the solution. works perfect.
  315334 [shortcutter@] Not sure whether it makes a difference performance wise but I am always
  315398 [fritz.thiele] thanks for your objection, but could you shortly explain the
  315401 [shortcutter@] Ideally you read "Mastering Regular Expressions" which explains such
  315402 [fritz.thiele] thanks for explanation and book hint. will search for it.
  315406 [todb@pl nb s] certainly influence your results.
  315488 [shortcutter@] Hm, it seems line 13 and 18 are identical.  Where's the lazy quantifier?
  315697 [todb@pl nb s] grr curse my copy paste skills. fixed. thanks for paying attention,
  315698 [todb@pl nb s] Anyway, I think the moral of this particular long-missing story is, if
  315704 [shortcutter@] I am not sure.  This approach is likely slower than a single fast RX -
  315738 [ezmobius@gm ] Also keep in mind that =~ is generally a lot faster then .match since
  315754 [b.candler@po] With =~ the MatchData can still be obtained from $~

cannot access gems
315288 [tomcloyd@co ] I seem to have run right into my ignorance again.
315310 [stefano.croc] This is the issue. The ruby you compiled is in a different location than the
315319 [tomcloyd@co ] Arrrgh! THIS makes tons of sense.
315328 [shevegen@li ] Because UNIX tradition means that often things grow chaotically up to
315353 [tomcloyd@co ] Marc -
315514 [rick.denatal] ...

Ruby developer Position @ Midtown , Atlanta - US
315314 [nick.asap01@] Please Send resumes to nick.asap01@yahoo.com;

315318 [gregory.t.br] ruby-talk@ruby-lang.org

good deadline to register to rubyconf08
315321 [paqs140482@g] ...
315366 [Bil.Kleb-use] ASAP (As Soon As Possible)

Reliable ping method from Windows?
315335 [damnbigman@g] ...
315340 [damnbigman@g] ...
315367 [jcmoore@pr s] NMap is very fast and comes in a WinDoze flavor.
315860 [damnbigman@g] ...

variable name
315341 [bellcolt@ho ] Is there a way in Ruby to use the content of a variable as the name of a
+ 315345 [TimHunter@nc] In general, no. Most of the time this problem can be solved by using a
+ 315346 [rubytraining] =3D=3D=3D=3D
+ 315376 [b.candler@po] If you're talking about "myVar" being the name of a *local* variable,

Array Count Issu
315343 [bornemann1@n] irb
+ 315344 [TimHunter@nc] String#count counts characters, not strings. You're asking how many c's,
| 315349 [bornemann1@n] I dont want to know how many characters are in a word i want to find the
| 315354 [adam.shelly@] => "cat cat fox"
| 315358 [bornemann1@n] This was the simplest for me to understand since I am very new to using
| 315361 [bornemann1@n] OMG
| 315365 [bornemann1@n] ok well now i got a bunch of repetitive arrays and repetitive counts how
| + 315368 [botp@de mo t] # ok well now i got a bunch of repetitive arrays and repetitive
| + 315404 [list.push@gm] str ="cat cat hat fox hat hat foo bar bar hat test bar hat fox"
+ 315357 [w_a_x_man@ya] count = 0
+ 315359 [caduceass@gm] a = "duck","duck","goose"
  315405 [lloyd@2l ve ] Todd, that is just wonderful!  I have been playing with variations from

How can I setup a Rails-like task directory
315362 [ethergraphic] I looking for a way to create a centralized library of rake files and
315364 [stephen.celi] Best,

Getting a constant inside a class
315369 [bjohnson@bi ] How do you grab the value of a constant if it is inside a class << self?
315381 [b.candler@po] You've explicitly defined the constant inside the metaclass (singleton

Absolute Beginner help
315377 [grant@mr t. ] ...
315389 [fox@ns l. su] You'll probably need to supply more information about how your web

rubygems won't install - don't understand why
315378 [tomcloyd@co ] I can't get rubygems to install, and I don't understand what the problem
315379 [b.candler@po] I run Ubuntu 8.04.1 with my own compiled ruby 1.8.6p114, which is very

"warning: peer certificate won't be verified in this SSL session"
315384 [andydevale@g] Some time ago I started playing around with Soap4R on a vista (groans)

rb_include_module() doesn't call Module#included
315385 [ddungum@gm i] I'm writing a c extension and I want to create a class called "World"
315386 [TimHunter@nc] You could use rb_funcall instead.
315388 [hyoonjae@na ] Thanks for your reply, Tim.
315390 [rmagick@gm i] The argument to include is a module, not a string, so you'll need to
315391 [hyoonjae@na ] Thanks for you detailed explanation, Tim.

315387 [gani_chinta@] Is there any plugin for pagination which will display the page

cheap dunk shoes and air force one in ( www.cncircle.cn)
315392 [sourcesoso2@] (www.cncircle.cn) cheap sale

IRB + C Extension = Memory Loss
315407 [ryan@ra ls a] I'm having difficult making a simple C extension. The struct's memory
315411 [rmagick@gm i] GC is collecting the greeting string because it thinks there are no
315413 [ryan@ra ls a] Thanks! That makes sense. Calling rb_gc_mark(*hello->greeting) in the
315422 [rmagick@gm i] Let's back up a bit. I assume you're storing the VALUE passed into

How to provide variable to irb session
315409 [btrichardson] Can anyone tell me how I would go about providing a variable to an irb
+ 315416 [tpreal@gm il] You can run your script at Ruby startup by specifying env variables
| 315426 [todb@pl nb s] todb@planb-security.net | ICQ: 335082155 | Note: Due to Google's
| 315434 [btricha@gm i] Sweet... thanks!
+ 315436 [b.candler@po] Is it definitely a variable, not a method?

That was unexpected -- strange scoping behavior
315412 [wpdster@gm i] #!/usr/bin/env ruby
+ 315417 [tpreal@gm il] Yes, it is a small gotcha. In Ruby 1.9 this is going to work like
+ 315418 [dido.sevilla] Interesting. So I suppose that means that there's a hole in Ruby's
  315423 [tpreal@gm il] I guess, it's rather not a hole in the implementation, but sort of a

Hash default value question
315420 [glenn_ritz@y] ...
+ 315429 [caduceass@gm] snip
+ 315430 [Rob@Ag le on] The Hash.new([]) causes a single array to be used (shared) for the

Using Rails App (Models) in my Ruby script.
315424 [nick.gorbiko] I'm writing a script that's going to run on schedule to pull some info
+ 315425 [caduceass@gm] You might be able to simple load them (load '/dir_path/my_model.rb').
+ 315437 [b.candler@po] script/runner
| 315440 [nick.gorbiko] script/console  would load an interactive console - that's waiting for
| 315445 [nick.gorbiko] Ok I just did a search on Ruby Forums and I think I found what I needed.
| 315446 [nick.gorbiko] Also this method works cool for scheduled PDF printing - just printed my
+ 315443 [       m@t. ] just require boot.rb and environment.rb (don't forget to set rails_env to
  + 315447 [james@gr yp ] environment.rb required boot.rb for you, so it's all you need.
  + 315449 [nick.gorbiko] James & matu

Question about multi-demension hash initialization
315427 [ruby.student] ...
315503 [shortcutter@] Err, what?  You know how to create nine hashes but you do not know how
315526 [ruby.student] ...
315586 [shortcutter@] You're welcome.
315593 [ruby.student] ...

Question about REXML
315428 [bradaskins@g] I'm trying to follow this tutorial: http://www.germane-software.com/software/rexml/docs/tutorial.html
+ 315438 [matt@ti bi s] It isn't. :) Say
+ 315501 [shortcutter@] As Matt said, it isn't.  But you should make it a habit to properly

Confused regarding text example
315433 [davidinanhui] Hey,
+ 315439 [shawn42@gm i] ...
+ 315451 [jgabrielygal] What it seems to me is that the code is a way to classify objects based on each
  315491 [davidinanhui] Alright, I think I got it.

[JOB] Softwareentwickler/-in, prometheus-Bildarchiv, UniversitçÕ zu K÷Ín
315441 [jens.wille@u] We, the prometheus image archive at the University of Cologne
315678 [shortcutter@] First of all this is an English group so placing a job offer in German
+ 315685 [Rob@Ag le on] I think this is fine.  It had a "[JOB]" tag in the subject, an English
+ 316330 [jens.wille@u] Sorry for replying so late, but I've been on vacation.

How to read drive label
315442 [tpreal@gm il] machine from within a program. Is there any universal Ruby command to do
315450 [s.korteling@] require 'ruby-wmi'

315444 [junkone1@gm ] i get a error i dont understand. pl help
315479 [jdinkel@gm i] rubyscript2exe has problems with rubygems 1.2.0.  You'll need to
315484 [erikveen@gm ] gegroet,
315509 [junkone1@gm ] i tried this
315588 [a99.googlegr] I had the same problem two weeks ago and managed to solve it with the
315642 [rpminihan@gm] One little change.  ruby  C:\ruby\lib\ruby\gems\1.8\gems
315646 [a99.googlegr] You're right. Thank you!
345691 [jazzezravi@g] I am getting this error
+ 345694 [wujunchen@gm] Maybe you should try ocra instead of rubyscript2exe,it's excellentï¼?
| 345715 [jdinkel@gm i] I've pretty much given up on r2exe.  I don't want to be stuck using an
| 345957 [jazzezravi@g] Yes. Ocra Rocks.
+ 346042 [leslieviljoe] I have fixed this in my own local copy of RubyScript2Exe because I
  346101 [jazzezravi@g] Error when i run the last command.
  346109 [i8igmac@ai .] rubyscript2exe.rb

how to manage passwords
315448 [junkone1@gm ] many of my ruby apps have the password hard coded. i am looking for a
+ 315455 [keeperotphon] ...
+ 315511 [yu.ching.tie] could use String#crypt
| 315587 [perrin@ap th] I don't recommend relying on crypt if you want "real" security.  The
+ 315641 [justincollin] Do you need to know what the stored password is, or do you just need to
  315700 [junkone1@gm ] i just store passwords in text files. i am looking for a secure way of
  + 315719 [todb@pl nb s] Hmm, that'd be quite the trick. Not even the professional-grade IM
  + 318083 [sandor.szuec] It's a month ago but maybe it helps anyway.

overwriting hash key
315453 [jhavero@gm i] How can get Ruby to tell me when I'm overwriting an existing key in my
+ 315456 [Rob@Ag le on] h = Hash.new {|h,k| h[k] = []}
+ 315457 [s.korteling@] class SafeHash <Hash

[ANN] RDoc 2.2.0 released
315458 [tony.strauss] RDoc 2.2.0 now is available!
+ 315459 [tony.strauss] The formatting of the change list got messed up a little.  The changes
+ 315468 [james@gr yp ] Wow, this sounds really great.  Thanks!
| 315480 [drbrain@se m] That's the plan.
+ 315538 [matt@ti bi s] That's great news, because I downloaded the previous version of RDoc and
| 315748 [drbrain@se m] $ ruby -ve 'p File.superclass'
| 315876 [george.ogata] Does CAST cut it?
| 315897 [drbrain@se m] I think it might.  I'll keep it in the back of my mind until I have
+ 315607 [james@gr yp ] I found two issues when working with RDoc 2.1.0 yesterday.  I haven't

[QUIZ] One-Liners Mashup (#177 again)
315460 [matthew.moss] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ 315466 [yahivin@gm i] def repeat(i)
| 315469 [wpdster@gm i] def repeat(i)
| 315473 [yahivin@gm i] . I couldn't use flatten because it would destroy nested arrays.
+ 315470 [james@gr yp ] class Array; def repeat(n) zip(*([self] * (n - 1))).flatten end end
| 315471 [wpdster@gm i] How about
| 315475 [ninja@sl ph ] class Data2D
| 315477 [james@gr yp ] class Data2D; def [](x) lambda { |y| @data[y][x] } end
| 315560 [ninja@sl ph ] Nice! That's definitely an improvement over mine.
+ 315474 [billk@ct .c ] # Partial solution, we would need a flatten(1) to prevent it from
| 315478 [james@gr yp ] ruby -e 'p ARGF.read.scan(/\d{1,3}(\.\d{1,3}){3}/).uniq.size'
| + 315482 [sepp2k@go gl] Wasn't that a question in the old one liner quiz?
| | + 315485 [hmack.gm@go ] ...
| | + 315486 [billk@ct .c ] Indeed, I recall this from a previous ruby-talk thread... my
| | | 315490 [billk@ct .c ] ... and the solution therein appears to have the same single-word
| | + 315528 [james@gr yp ] Ouch, it was.  Your memory is better than mine!  :)
| + 315498 [jcoglan@go g] ...
| | 315544 [hmack.gm@go ] ...
| + 315583 [kbloom@gm il] Hey, you posed that one already in Ruby Quiz 113
|   315605 [james@gr yp ] Yeah, this was pointed out earlier.  I must me losing my mind.  Sorry!
+ 315493 [jcoglan@go g] ...
+ 315715 [chneukirchen] class Array
+ 315745 [caduceass@gm] Technically not one line, but it's under 80 chars and is recursive...