208978-233890 subjects 209477-210403

^ Question on speed
209211 [jesse.r.brow] File.open(name).each { |line|
209220 [pbattley gma] Ruby doesn't compile the separate expressions: it sends ===(subject)
209234 [jesse.r.brow] Thank you for the explanation and example (it's plenty 'un'scientific

^ [ANN] Spreadsheet-Excel 0.3.5 released
209214 [hannes.wyss ] == What is it?
+ 209310 [lopx gazeta.] Has anyone tried to support strings longer than 255 characters (the cell
+ 209598 [zoso foton.e] re
  209623 [hannes.wyss ] (And http://rubyspreadsheet.sourceforge.net - which is to be moved to RubyForge)

^ Net/LDAP, eRuby/CGI problem
209236 [justin.crawf] I've been trying to build a CGI LDAP tool for password changes using
209242 [decoux moulo] Well, if I remember well eruby run with $SAFE = 1

^ Bug in sprintf?
209245 [weyus att.ne] All,
+ 209248 [wccrawford g] Because 8 isn't an octal number.  0-7 are octal.
| 209250 [wccrawford g] -slaps self- Think before you reply, William.
| 209251 [wccrawford g] Last time, I swear.
| 209325 [hal9000 hype] This comes from C, and is at least 30 years old.
+ 209249 [ara.t.howard] main(){ char s[42]; int r = sprintf (s, "%d", 07); printf ("%d: <%s>\n", r, s); }
  + 209253 [angus quovad] It is not expected, nor documented, because the documentation of sprintf
  | + 209263 [reima gmx.ne] I disagree on that. %d tells sprintf to expect an Integer as the
  | + 209268 [martin snowp] I think that the problem here is that ruby is performing two
  | | + 209279 [weyus att.ne] I'll buy that.  I did know that my input was a String so I am implicitly
  | | | 209329 [hal9000 hype] Actually I failed to take that into account, so what I said
  | | + 209292 [fxn hashref.] How did you figure that out? I started at sprintf.c and browsed a bit
  | + 209326 [hal9000 hype] The string of characters is interpreted as a decimal number IF IT IS
  |   209340 [angus quovad] [Hal Fulton <hal9000@hypermetrics.com>, 2006-08-19 00.27 CEST]
  |   209341 [hal9000 hype] Why would you pass a string to something that expects a number
  |   209342 [hal9000 hype] Actually, let me say this, as it's more informative and
  |   209361 [robert.dober] Hal
  |   + 209374 [halostatue g] sprintf("%02d", 3)
  |   + 209453 [hal9000 hype] I see your point. Truthfully, I think automatic conversion of a
  |     209471 [robert.dober] Yup, I failed to be clear about this sorry for wasting Austin's and your
  + 209255 [weyus att.ne] Thanks for the comprehensive response.
    + 209256 [weyus att.ne] What Carlos said ;)
    + 209260 [jan.svitok g] As I see it, there are two separate things: WHAT number you want to
    + 209278 [jesse.r.brow] The format character (%d) is a way to know how the values collected
    + 209293 [david vallne] Declare your intent by doing '08'.to_i(10) instead. In fact, declare
    + 209327 [hal9000 hype] I see your point. But most things in Ruby that are stolen from C

^ is there a tutorial for RoR using legacy DB's
209254 [jfabiani yol] I need to setup a website reporting tool.  I thought I try RoR (therefore I'm
209259 [halostatue g] You'll probably get better answers at
209264 [masukomi gma] He's right about that being the right place to ask but the short

^ parsing commandline parameters to a win32ole instance of an application
209258 [simon.lont g] I'm a newby to ruby and I'm trying to whrite a script that uses the

^ Refactoring transactional support within Puppet (long)
209270 [luke madstop] This is one of those "complicated" problems I mentioned a bit ago.
209288 [ara.t.howard] 1) make transactions re-entrant AND singleton
209428 [luke madstop] Hmm.  If I do this, then at the very least I want to organize things

^ `cmd` and UTF-8
209281 [atd ruidodeb] I have spent several hours searching for this and I still don't know how
+ 209282 [pbattley gma] Do you mean the return value? That depends on your platform, locale,
| 209287 [atd ruidodeb] Yes, I mean the return value.
| + 209314 [david vallne] Until Ruby gets some non-basic Unicode support, I -think- you're stuck
| + 209347 [nobu ruby-la] Then what encoding does your target program use?
+ 209556 [atd ruidodeb] ENV["LC_ALL"] = "C.UTF-8"

^ Machine sync
209284 [carl.sampson] I have two machines that I would like to make sure have identical ruby
209432 [leslieviljoe] I don't think so - I have quite a lot of stuff in /usr/lib/ruby. What

^ Re: RubyPhone 0.1.8 released.
209290 [greg.kujawa ] Actually I wrapped a couple of extra CTI methods today and have updated

^ Class variables in Ruby
209291 [prcorcoran c] I am trying to cache lookup table values from a database table into a
209294 [khaines enig] @@cacheDescr = {} unless @@cacheDescr
+ 209308 [rabbitblue g] @@cache_descr ||= {}
| 209311 [khaines enig] Which I usually prefer, but the variant that uses unless reads more like a
+ 209320 [prcorcoran c] I tried @@cacheDescr = {} unless @@cacheDescr but I get the same
| 209344 [ara.t.howard] but the file may be getting loaded each time... depending on mode.  fyi.
+ 209346 [prcorcoran c] class for every request coming into the application and therefore
  209352 [james graypr] You really, really don't want to do this.  Trust me.  ;)
  + 209353 [ara.t.howard] or you need to configure your app so that only one instance will run at once -
  + 209392 [prcorcoran c] James,
    + 209402 [gwtmp01 mac.] Just a side note.  It isn't necessary to use class variables to
    | 209412 [prcorcoran c] I'm not quite sure what you mean by using "an instance variable of the
    | + 209436 [jan.svitok g] This comes from Ruby's object model (and this may sound familiar to
    | | + 209485 [dblack wobbl] Just one additional comment: you'll also see instance variables of
    | | + 209541 [prcorcoran c] Yes, this makes perfect sense now that you mention it. I had not seen
    | + 209635 [rick.denatal] Smalltalk has pretty much the same thing, there's a difference between
    |   209637 [dblack wobbl] The class and its subclasses are different objects, though, so they
    + 209406 [james graypr] This smells like premature optimization to me.  You've timed it and
      209417 [prcorcoran c] I do appreciate your comments and I was not aware of the caching
      209424 [rsanheim gma] This is getting more into rails-talk, but just fyi - the built in
      209542 [prcorcoran c] Yes, MemCache looks like what I am after. Right now I'm doing

^ How to turn off input echo in irb?
209295 [jacklty gmai] How to turn off input echo in irb?
+ 209312 [david vallne] irb is a read-eval-print-loop, why would you ever want to do that? If
| + 209315 [jacklty gmai] I am trying to write a irb console in my java app (Using JTextArea and
| | 209317 [david vallne] Ah. *puts dumbass hat on*
| + 209368 [none none.co] If you are using irb in irb-mode in Emacs, then why would you want the
+ 209555 [robert.dober] Now another probably dumb question, does irb echo? I do not have the

^ Re: Question on speed [OT]
209296 [david vallne] Shh. Don't tell anyone, but there's the benchmark module 'bm'. Pickaxe

^ exception handling in ruby
209297 [junkone1 gma] My exception handling routine is not able to thro the stack trace etc
209299 [jan.svitok g] rescue Exception ex

^ cross-installing gems
209298 [kero chello.] Obvisouly I want post-install.rb to write in ./ipkg, as setup.rb does.

^ File creation time
209302 [kendrhyd sym] I see the File.atime/ctime/mtime methods documented, but is there a
209305 [phrogz gmail] This was asked 3 days ago. See http://rubyurl.com/8vE

^ How do I download Ruby DBI?
209303 [needin4matio] I'm trying to download ruby dbi.  I am using Apache on Windows.  What I
209316 [wccrawford g] There ya go :)

^ User Interface Designer for GTK+ and GNOME
209306 [felipeureta ] I'm posting here since I cannot do it in the Ruby-Gnome 2 forum.
+ 209364 [interfecus g] The idea behind glade is that you keep the interface separate from the
+ 209469 [boukewoudstr] Glade can do anything you want it to and is fast too. If you want to
  209561 [felipeureta ] Thanks for both of your replies. Crazy88, I'll look at the code of your

^ Curier-IMAP and imap.create()
209354 [henrik.ormas] I don't get imap.create to work on Courier-IMAP. I can search

^ how does sort work on hash
209355 [inxs.hemant ] I am just a little curious about how exactly sort workes on hashes.
209360 [robert.dober] x and y represent the key, value pairs of the hash and therefore you sort b=

^ best-performing Rss parser
209358 [ray.c.chen g] I am working on a project that requires rss parsing for pre-fetched web
209359 [ray.c.chen g] One more.
209448 [vacindak gma] Right now, I'm recommending that people who care about performance use
211185 [ray.c.chen g] Just wanted to give everyone who's curious an update on this situation.
212647 [vacindak gma] The results aren't even remotely suprising to me, but yeah, they

^ help with TkRoot
209362 [Diego.Viraso] I would like to write a program on the Mac which at the start only
+ 209425 [m_goldberg a] Yes, you can make the root window invisible. The following produces a
| 209430 [m_goldberg a] Now that I've looked a little deeper into the problem, I see that
+ 209584 [gk cutcopy.c] Maybe you could try to define the menubar in the root window with proper

^ Ruby on Rails testing/ fixtures question
209363 [s.richards c] I'm using Test::Unit::TastCase and am having some problems getting
209367 [drbrain segm] The Ruby on Rails mailing list is the appropriate place for asking

^ Why is my http call failing?
209365 [none none.co] print(http.head('/yaml'))
+ 209366 [wccrawford g] #<Net::HTTPOK:0xb7bef67c>=> nil
| 209369 [shortcutter ] Works for me, too.
| 209437 [none none.co] The firewall I use is zonealarm. It keeps prompting me to allow ruby
| + 209446 [garbagecat10] If telnet works fine, then it's probably not a firewall issue. The error
| + 209449 [ezmobius gma] I have seen this same issue on windows before. ZoneAlarm interferes
|   + 209451 [james.britt ] Interesting. I have ZA installed on two different WinXP boxen, and a
|   | 209455 [ezmobius gma] It has been a while since I've seen this issue as I don't use
|   + 209461 [none none.co] Hmmm.
|     209470 [shortcutter ] You can try Kerio Personal Firewall - personally I like it better than
|     209573 [none none.co] I removed ZA and installed Sygate. No difference.
+ 209373 [garbagecat10] What happens if you use a more recent version of Windows?
  209440 [james.britt ] This works for me on WinXP and a somewhat recent version of Curt's

^ Basics of eval?
209372 [jon.hadley g] I'm a 'ruby nubie' and otherwise unfamiliar with the ':eval' technique
+ 209380 [M.B.Smillie ] There's actually several different things going on, so I'll give my
| 209408 [james graypr] SymbolsAreNotImmutableStrings.red
+ 209383 [lopx gazeta.] You use eval with ajaxscaffold when you want to supply more complicated
  209390 [jon.hadley g] Thanks guys, some outstandingly useful and pertinent advice.
  + 209396 [alex blackke] Check http://ruby-doc.org/core/classes/Kernel.src/M003216.html.  No idea
  + 209410 [james graypr] The book Ruby for Rails has a section that explains and compares the

^ Client/server with threads
209375 [andreas.alin] Yow!
209376 [garbagecat10] First, make sure your constructor is getting called. You spelled it
209377 [andreas.alin] Oh, thanks. :) Didn't see that. :)
209387 [garbagecat10] Please forgive me, I don't intend to be rude, but this program is not
209403 [andreas.alin] Thanks for the advice, and for explaining :)

^ Convert "ThisIsSomeString" to "this_is_some_string"?
209378 [forum josh.c] What's the fastest way to convert "ThisIsSomeString" to
+ 209379 [ara.t.howard] def snake_case string
| 209381 [forum josh.c] Thanks a lot for your help. :-)
+ 209385 [lopx gazeta.] p "ThisIsSomeString".scan(/[A-Z][a-z]+/).map{|w|w.downcase}.join('_')
| + 209386 [forum josh.c] syntax error near unexpected token `('
| | 209404 [lopx gazeta.] works for me, maybe some typo ?
| + 209393 [ara.t.howard] irb(main):001:0> "FooBAR".scan(/[A-Z][a-z]+/).map{|w|w.downcase}.join('_')
|   209665 [rick.denatal] Oh, look, a mini-quiz!
+ 209389 [daniel.schie] I believe this is the fastest way, though it may not catch all cases
| 209394 [ara.t.howard] irb(main):025:0> lowerize 'BARFoo'
| + 209418 [khaines enig] How about this one?
| + 209421 [daniel.schie] Correct. Your solution has a flaw, too.
|   209427 [ara.t.howard] good catch!
|   209433 [daniel.schie] Can we agree that "ABCde" => "ab_cde"?
|   209435 [ara.t.howard] sure.  it's arbitrary i realize - but i make sense to me!  ;-)
|   209473 [daniel.schie] Cheers,
|   209476 [daniel.schie] class String
|   209504 [ara.t.howard] <snip and integrate into my test>
+ 209411 [bauer.mail g] require 'action_pack'
| 209563 [listbox juli] require 'active_support' is enough.
+ 209429 [w_a_x_man ya] p ["FooBar","fooBar","FOOBar","FooBAR"].map{|s|
+ 209459 [logancapaldo] I like to do string.split(/(?=[A-Z])/).map { |s| s.downcase }.join('_')

^ attributes[:xxx] does not work within model?
209382 [forum josh.c] I have a model User that contains the attribute avatar. I'd like to
209384 [forum josh.c] Oh I'm sorry, wrong forum... Should go into the Rails forum.

^ Who's a newbie?
209391 [bob rjoslyn.] (Note - I'll fix the margins before I post again)
+ 209414 [david vallne] -1, Rant
+ 209420 [znmeb cesmai] The original BASIC from Dartmouth was an intentionally limited dialect

^ Match all occurance of double quotes in a string
209395 [patrick pksp] I have a string something like this...
209397 [alex blackke] string.sub(/"([^"]*)"/, '[i]\1[/i]')
209398 [patrick pksp] I like simple, thanks!

^ SOS Taskable
209399 [transfire gm] I'm stuck. I can't figure out how to implement Taskable. If you haven;t
209426 [transfire gm] Never mind. I just reworote the whole thing from scratch WITHOUT using

^ Fixing ruby on Mac OS X Tiger
209400 [explorer gma] Hey all, I'd greatly appreciate it if someone could help me with this
209416 [canyonrat ma] <http://ruby-lang.org/en/> and download the latest stable or stable

^ Ruby + IMAP + Attachment
209405 [stian.hole g] I am trying read out attachments using Net::IMAP, but this seems to be
209409 [decoux moulo] You have an example in comp.lang.ruby

^ How to override RUBYLIB for soap4r on shared host?
209419 [bothari gmai] Group,

^ {} as record separators?
209422 [punkrockgeek] I'm working on a ruby script to read Nagios's status.dat and output it's
+ 209439 [yu.ching.tie] ** first try **
+ 209441 [bauer.mail g] def nagios_data(data)
| 209442 [punkrockgeek] nagios_test2.rb:10:in `nagios_data': undefined method `intern' for
+ 209444 [punkrockgeek] So this code actually works. It reads through my key=value pairs just
+ 209445 [johnatl mac.] Bob,
  209901 [johnatl mac.] So, did it work?
  209948 [punkrockgeek] Actually, I was just working on debugging this error that the script
  210044 [johnatl mac.] Hm, probably a ' in the dumped data.

^ Initializing $LOAD_PATH manually? (embedding ruby)
209434 [dharple gene] I am embedding ruby in an application and shipping it with app as
209438 [dharple gene] NSBundle *bundle = [NSBundle mainBundle];
209447 [nobu ruby-la] Or, you can use ruby_incpush(), which splits path list with

^ Metaprogramming: Dynamic class generation
209450 [luke madstop] The article discusses a new method I've created in Puppet for making
209510 [ara.t.howard] first off, thanks for the article - i know this stuff is hard to write
209518 [luke madstop] Yes, it is; I've got a grammar and everything for it.  Before

^ Dir.bitbucket?
209452 [djberg96 gma] bitbucket = RUBY_PLATFORM.match('mswin') ? 'NUL' : '/dev/null'
209456 [luke madstop] it's not quite the same thing, since it's not a part of the Ruby

^ how to create multiple different arrays using a loop
209457 [chilaquil gm] I need to create a different array each time that I am going through a
209458 [luke madstop] hash = {}
209500 [shortcutter ] I'd say Jeffrey's approach (i.e. stick those arrays into an array) is by far
209515 [luke madstop] Sure; if you need to be able to sort based on name, use an array, I
209533 [chilaquil gm] Thanks to all of you...I used your suggestions and my code is working

^ private and self
209460 [marinho.tobo] Why doesn´t the call with self doesn´t work ? I know that private means
+ 209494 [dave pragpro] ...
+ 209502 [robert.dober] ns

^ Defining a method []=
209462 [brettkushner] I have used a method of [] with "def method[](string)". But I can't
+ 209463 [hal9000 hype] Much the same way -- it will have two parameters.
+ 209464 [johnatl mac.] def method[]=(index, value)
+ 209465 [arrogantpara] You define a method called "[]=".

^ Remove from an array
209466 [nicolasbenad] I have an array, let's name it items[]
209467 [nospam nosit] items.delete_at(3)
209468 [hal9000 hype] Did he want to remove the element at index 3,
209474 [nospam nosit] I suppose I should have asked that before replying. :)
+ 209475 [robert.dober] items.delete 3
| 209484 [devlists-rub] This is slightly off-topic, but...
+ 209506 [nospam nosit] / ...