239003-332340 subjects 239426-254558

Re: [ANN] heckle 1.3.0 Released
239176 [djberg96@gm ] Solaris 10
239254 [ryand-ruby@z] Dan... you know better. File a bug.

Converting Bytes to  a Negative Integer
239185 [hreynolds2@y] 255 255 255 236
+ 239212 [james@gr yp ] => "\377\377\377\354"
| + 239216 [tim.pease@gm] LITTLE_ENDIAN = [42].pack('i')[0] == 42
| + 239217 [halostatue@g] Joel VanDerWerf had something that I'll be adapting if I need it elsewhere.
+ 239230 [m_goldberg@a] data = ""
  239239 [james@gr yp ] => ""
  + 239346 [hreynolds2@y] bits = 32
  | 239375 [halostatue@g] The bytes are wrong. The bytes for 7,777,777 in "N" format are [0,
  + 239351 [m_goldberg@a] I see your point. Many new computers have 64-bit CPUs and we should
    239355 [james@gr yp ] I'll prop you back up then, this isn't a 32 to 64 bit (size) issue.
    239423 [m_goldberg@a] Mea culpa -- I didn't see your point at all. Let's see if I've got it
    239445 [james@gr yp ] Yes, it's an Intel Core Duo Mac.

how to do: var1 = var2.new(.....) (var2 contains classname)
239188 [lcalje@gm il] I have a situation in which I have the name of the class in a variable
+ 239190 [lyle.johnson] var1 = Object.get_const(var2).new("Bicyclops", "Fleck", 260)
| 239194 [lyle.johnson] Whoops, that should be "const_get(var2)", not "get_const(var2)".
+ 239192 [tim.pease@gm] You need to convert your string "Song" into a Class object.
+ 239193 [codeblogger@] ...
+ 239289 [gareth.adams] I'm surprised no one else has mentioned this, but there's very little need to

Another Programming Ruby Question
239189 [bruparel@me ] This is from Chapter 11 titled "Threads and Processes" of Programming
+ 239303 [ljz@as as .c] ios.sync = boolean => boolean
| 239444 [bruparel@me ] I appreciate your time and detailed response.
+ 239473 [ mfp@ac .o g] The example assumes that the threads will be executed serially, and those with
  239621 [bruparel@me ] Thank you Mauricio.  This makes perfect sense now.

Re: how to do: var1 = var2.new(.....) (var2 contains classna
239196 [lcalje@gm il] Thanks for the solution!
239197 [patrick@pk p] should be #const_get()

Ruby and Ruby on Rails - Tell us what you think
239214 [jmcglynn@co ] My company, CodeGear (the Borland spin-off) has a survey open on Ruby

How to work with a XML schema with Ruby?
239222 [grettke@gm i] I need to take a XML schema and do some arbitrary text generation
+ 239223 [palmerj3@gm ] ...
+ 239233 [mark@oc we .] If I were doing this, my first choice would be XQuery and my second
  239344 [grettke@gm i] You know after I posted this I thought to myself that an xml schema is

Ruby script to EXE
239229 [vinod.patil1] Is there any other utility to create EXE out of Ruby scripts other
+ 239257 [ruby.hardwar] Harry
| 239291 [felipenavas@] Harry,
| 239301 [Gilbert.Rebh] /*
| 239325 [CXP04754@ni ] The project's Website provide English information.
| 239356 [vinod.patil1] Thanks Guys!
+ 239983 [csrabak@ya o] Can you post the minimum script.rb that shows that bug?

Re: Adopt-a-newbie? Based on actual experience. (Volunteering!)
239232 [public@mi us] Send a newbie my way - great idea! This way the smart people on the

[ANN] fastthread- released
239238 [mental@ry ia] =3D=3D NOW

Strange Camping Error
239253 [starnix17@gm] I'm trying to deploy a simple Camping application using plain old CGI.
239255 [cdcarter@gm ] As you discovered in irb you must require 'rubygems' first, and you
239260 [starnix17@gm] Thanks for the explanation. I have require 'rubygems' before require
+ 239261 [hhausman@gm ] Sometimes, these sorts of problems are created by the fact that the
+ 239270 [jeremymcanal] Are you doing a require or require_gem (or properly, gem)?
  239272 [starnix17@gm] I'm doing require.
  239435 [starnix17@gm] Alright here's an update.
  239635 [starnix17@gm] I'm 100% that Apache is using the same Ruby, and the Apache user is the

soap4r wsdl2ruby.rb issue - part: value cannot be resolved (RuntimeError)
239259 [rob@no ad em] issue with wsdl2ruby.
239410 [rob@no ad em] Is there anyone here that could help me verify that this is a problem

curses library and threads
239264 [_nospam_seti] i believe curses lib comes with ruby 1.8.5.
239501 [nicolas.desp] Nico
239560 [_nospam_seti] Nico, thank you. I just looked in ruby-doc.org/core

Daylight savings time in US
239265 [erne@po er a] As most of you know the dates when DST begins and ends in the US have
+ 239284 [rubytraining] I'm sure the Time class' isdst method is making a call into the
| 239333 [erne@po er a] The Ruby version I'm using on windows (1.85) I installed using the
| 239354 [erne@po er a] Here's some more information.  I actually have Ruby working correctly in
+ 239361 [kbloom@gm il] This has to do with the systemwide timezone database on the system where
  239363 [erne@po er a] Actually M$ makes an update available for Windows XP and Server 2003.

RSCM and subversion
239268 [craigbeck@lu] Anyone know how to get the svn revision number of a locally checked-
239277 [alex@ve k. n] We have just solved this problem, and you can probably adopt some code

adwords4r, how to set bid $ for keywords
239271 [aktxyz@gm il] I would love an example for how to set the bid amount for keywords.

[ANN] ci_reporter 1.0 Released
239273 [nicksieger@g] ...

Perl6 on Ruby (redsix)
239279 [dudu@du u. o] I don't know how worthy this is in the context of Parrot, but it's

svn code  to check the classes
239280 [senvenit2003] we used this below comment to find the Frequently changing classes in
239330 [gethemant@gm] If you just mean the files then is doing this is sufficient?

ruby create web service client with php nusoap??
239285 [winson@ma l.] i will use ruby soap client to connect php nusoap server,but can't

how to call a .exe file in a ruby program
239294 [yu-xiaobing@] There is a executable file named "my_app.exe" and i want to run it in my
+ 239296 [sonoflilit@g] ...
| 239297 [sur.max@gm i] ...
+ 239300 [hhausman@gm ] Since you mention .exe I assume your on windows.
+ 239758 [sunrayson@gm] ...

compress CSS
239302 [cgallagher@g] Does anyone know of any script that can be used to compress css for
+ 239304 [foamdino@gm ] Have you looked at CSSTidy?
| 239308 [cgallagher@g] Looks like an interesting project. I'll have a look at it. I think i
| 239309 [foamdino@gm ] As it's c++ (ie native), you can add it to your rake/rant build as a
+ 239311 [dan-ml@da 42] gzip
| + 239312 [cgallagher@g] Looks pretty cool so think i'm going with that assuming it works :-)
| + 239348 [tom@in oe he] Or you can use mod_deflate; then you don't need to provide a gzip'd
+ 239485 [glenn.gillen] I've been working on a completely unrelated project but with code that

load testing using ruby
239306 [swapnali.bha] I want to simualte 300 users for an application.
239329 [gethemant@gm] Can you be more specific? Uses of what?
239371 [kyleaschmitt] If this is a webapp (and from your 300 user request I'm guessing it

Closures syntax ?
239313 [pedro.delgal] 1) if i defiene this
+ 239316 [lists@be tr ] Precedence. "do .. end" has low precedence, applies to the leftmost
+ 239336 [gwtmp01@ma .] Ruby doesn't expect a comma between the last standard argument and

[ANN] Motiro 0.6.2 released
239314 [thiago.arrai] Motiro is a very simple project tracking system. It is written in Ruby

sorting an array of hash
239315 [unbewusst.se] {type => aType, description => aDescription, extension => aExtension}
+ 239318 [farrel.lifso] arrayOfHashes.sort_by{|hash| hash['type']}
| 239321 [unbewusst.se] arr.sort!{|a1,a2| a1['type'] <=> a2['type']}
| 239323 [erikveen@gm ] arrayOfHashes is your array of hashes. You're calling it arr
+ 239320 [unbewusst.se] mime_types.sort!{|mime_type1,mime_type2|
  239328 [erikveen@gm ] But it's inefficient... (See benchmark below.)
  239332 [unbewusst.se] it was a "one time running" script then...

freeride under windows (totally newbie question)
239317 [akalmykov@op] I've downloaded Ruby One-Click installer (ruby185-21.exe), and tried to
+ 239319 [richard.conr] There is some kind of conflict between FreeRIDE and the latest Ruby
| 239322 [akalmykov@op] Thank you for the advices. I was just thinking that if a ruby
| 239326 [ml.chibbs@gm] ...
+ 239324 [smartgpx@gm ] from another relative newbie...
  239370 [richard.conr] Be warned - the editor will crash quite regularly however. Best to take

[SUMMARY] One-Liners (#113)
239327 [james@gr yp ] If you followed the solutions of this quiz you should have seen a little bit of

request to list: advertise adopt-a-newb in replies to newbies
239331 [sonoflilit@g] ...

just a question... (was: Re: [SUMMARY] One-Liners (#113))
239335 [ruby@ml ic m] Hmmm...  Not being aware of sort_by before, why this complicated? What's
239338 [james@gr yp ] In the above example I was trying to show what sort_by() does behind

is it behaving strange ?
239339 [sur.max@gm i] ...
+ 239340 [dblack@wo bl] It's doing what it should, I think.  *a means: the unarrayed version
+ 239341 [gethemant@gm] "If the last lvalue is preceded by an asterisk, all the remaining
  239345 [dblack@wo bl] ...
  + 239347 [sur.max@gm i] ...
  | 239359 [gethemant@gm] remember a would become an array here.because as explained above,if
  | 239362 [sur.max@gm i] ...
  | 239366 [gethemant@gm] Again, I am sorry to bore you with little known things. ;)
  + 239369 [robert.dober] Well I cannot speak for OP but what puzzles me is
    + 239373 [sur.max@gm i] ...
    | + 239376 [dblack@wo bl] b = 9,5   # => [9,5]
    | + 239377 [lukfugl@gm i] b = *a # where a = [9, 5]
    |   239379 [dblack@wo bl] irb#1(main):017:0> a = [9,5]
    |   239381 [sur.max@gm i] ...
    |   + 239385 [dblack@wo bl] In Ruby 1.8 and earlier, you can only do the * at the end of an array.
    |   | + 239409 [sur.max@gm i] ...
    |   | + 239478 [matz@ru y- a] You don't understand because it's a bug.  I will fix it soon.
    |   |   239483 [dblack@wo bl] Cool, thanks.
    |   + 239455 [botp@de mo t] # b = [*a,6] # => [9,5,6] ----- false,  compile error
    |     239456 [robert.dober] Botp
    |     239465 [sur.max@gm i] ...
    |     + 239482 [dblack@wo bl] irb(main):001:0> a = [1,2]
    |     + 239627 [botp@de mo t] # definitely, it seems so natural using
    |       239640 [gethemant@gm] Take a look at these
    |       + 239647 [robert.dober] I really start to love Smalltalk's syntax more and more...
    |       + 239660 [dblack@wo bl] I'm not sure I'm seeing what you're getting at in your example.  Isn't
    + 239378 [dblack@wo bl] I can't think of a case where you'd need it, since the arguments would
      239413 [robert.dober] Agreed, but that was *not* my point

dRuby file transfer performance issue
239343 [eivindan@sp ] I'm a Ruby newbie fra Norway (say that many times fast:)
239480 [eleanor@ga e] Your slowdown is an artefact of breaking the file read and transmit
239622 [ezmobius@gm ] Sending a file across drb like that is also incurring the cost of

Rials varable becomes nill on a render.
239358 [moose56@gm i] First off apologies for a rails question on the ruby list, but the

Rials varable becomes nill on a render.
239364 [hreynolds2@y] This happens because you are calling the render method instead of redirect_to.  Calling render causes the invocation to "render" the new view and the new action (method) is never invoked.  If you change that to redirect_to it will call the action you want.
239367 [moose56@gm i] Thank you.

Iterating through 2 fields for one hash, or array.
239365 [pbailey@bn .] I'm using Jamey Cribbs' KirbyBase as a database. The beauty of it is, of
239368 [alex@bl ck e] I don't know the syntax for getting the data out of KirbyBase, but the
239387 [pbailey@bn .] Thanks, Alex. I'm sorry. I didn't include any KirbyBase lingo
239403 [alex@bl ck e] p @cost_centers
239495 [pbailey@bn .] I get a half pyramid of data, like this, all the way down for about 150
239507 [alex@bl ck e] Eh?  You should get a single hash...  What I'm trying to get at is
239511 [pbailey@bn .] I got it, Alex. And, it was my error. I was doing a "p" before my "end."

404 errors
239372 [wbsmith83@gm] ...
239374 [sur.max@gm i] ...
239422 [wbsmith83@gm] ...
239432 [halostatue@g] If you're dealing with a Rails issue, I recommend asking this question

Best way to skip tests
239382 [djberg96@gm ] What's the general approach folks use for skipping tests? Sometimes I
+ 239383 [alex@bl ck e] If you were to factor the platform-dependent tests out into their own
| 239384 [djberg96@gm ] It's not a bad idea, but that still wouldn't explicitly indicate to a
| 239390 [james@gr yp ] I think it's a much better design though.
| + 239394 [lukfugl@gm i] I agree that the skipping should be done outside of the test method,
| | 239397 [tim.pease@gm] Now you have test names in two places, and when someone renames
| | 239402 [ara.t.howard] why not block form
| | 239406 [djberg96@gm ] I don't think we need that level of granularity. At lease, I've never
| + 239396 [tim.pease@gm] That would be a design error, and an exception should be raised.
| | 239401 [gregory.t.br] I like this idea too.  I usually will print  a message to STDERR when
| + 239617 [steven@lu os] Started
+ 239395 [james@gr yp ] at_exit { warn "The Windows tests were skipped." }
+ 239399 [ara.t.howard] oh -- i just don't write them...
| 239400 [james@gr yp ] Cracked me up.
+ 239404 [rsanheim@gm ] Here's a little something I've used...the reason was we had shared
+ 239408 [louis.j.scor] Dan;
+ 239428 [jeremy@hi eg] Well this may not be the best way but it works.  Although it doesn't
+ 239451 [jeremy@hi eg] Well kept thinking about this today and came up with a Module approach,

within a block passed to "each" can I detect the last time the block is called?
239388 [greg.hauptma] ...
239393 [james@gr yp ] postDataString << postDataHash.map { |k, v| "#{k}=#{v}" }.join("&")
239405 [greg.hauptma] ...

239389 [tax_man_de@y] #help

Found a Find.find() bug?
239391 [robertlaferl] I was trying out Find.find() today and found that if you pass it a directory without a trailing slash, it doesn't traverse the directory.  This seems like a bug to me.  Is it?  If so, how do I report it?
239411 [drosihn@gm i] ...
239412 [ara.t.howard] i __think__ this could happen if /tmp were a soft link... ??
+ 239414 [ruby@ph li .] It can using normal OS commands so I'd imagine the same is true with
+ 239416 [drosihn@gm i] ...
| 239417 [drosihn@gm i] ...
+ 239418 [ben@bl yt in] folio ~/projects > ls /tmp
  + 239419 [robertlaferl] Sorry, there was a typo in my e-mail.  One should be "/tmp" and the other should be "/tmp/"  And yes, I am using this on Mac OS X where /tmp is a symlink to /private/tmp.  Should Ruby care about symlinks?  IMHO, it should work whether or not it is a symlink or not.
  | 239472 [shortcutter@] /private/tmp.
  | 239551 [djberg96@gm ] if File.lstat(file).directory? then
  | 239587 [shortcutter@] My point was that both behaviors have their place and changing it to
  | 239596 [ara.t.howard] my alib library exports this
  | 239607 [djberg96@gm ] I'd vote to add support for a :follow option as well - just watch for
  | 239608 [ara.t.howard] ...
  | 241001 [winstont@um ] ...
  + 239420 [ara.t.howard] path = File.expand_path path

odd error with expect
239392 [a.goo0h@gm i] I've had a trivial expect script in use for a while now, but with
240884 [manjiro@gm i] I came up with the same problem, except mine was running 1.8.4 on
240957 [B.Candler@po] Well, it looks like getc is returning nil. But this is despite the fact that

Optional libraries : openssl, readline, zlib, what is needed?
239398 [anibalrojas@] Is there a way to know what are the optional libraries should be
239618 [steven@lu os] There seems to be a lot of room for interpretation there.

Processing a text file
239415 [barjunk@at g] davidh Calling-Station-Id != "00-1A-02-3E-93-28", Auth-Type := Reject
239454 [efine145-nos] I don't know how big the file is, but if you can read it all into a

Does it make sense to flush and close?
239421 [mischa78@xs ] # Save the file on the file system
+ 239583 [drbrain@se m] Unlikely.  It only ensures the data is written to the file.
+ 239592 [drosihn@gm i] ...
  239756 [sunrayson@gm] ...

RDocTask and SVN
239424 [nappin713@ya] I have a standard RDocTask in my rake file that creates my
+ 239425 [ben@bl yt in] My personal preference is to svn:ignore any directory that contains
| 284913 [benjamin.d.o] I agree with what you say, but this doesn't solve the issue.  This is
| 284940 [benjamin.d.o] I solved my own problem.  I had tried both the above mentioned command
+ 239580 [drbrain@se m] svn rm doc; svn ci -m "Don't need doc checked in it is generated with