256259-258522 subjects 256660-262622

Sun Cobalt RaQ 550 Installation
256428 [landa@la da ] I tried to install Ruby per the instructions on

How can I implement cd (change dir) command in Ruby?
256429 [sam.s.kong@g] This question is rather out of curiosity than practical.
256431 [sami.samhuri] Only if your shell is done in Ruby as well. chdir(2) changes the

Ruby doesn't know how to multiply
256447 [rjprado@gm i] Dear friends, today I have stumbled into a really weird problem. Try
+ 256451 [juapdiaz@gm ] ...
| 256455 [james@gr yp ] James Edward Gray II
| 256456 [juapdiaz@gm ] ...
| + 256459 [a.r.ferreira] Some numbers (like 0.1) cannot be represented exactly in binary with a
| | + 256463 [rjprado@gm i] I'm starting to remember something about that on my computer
| | | 256468 [mental@ry ia] I guess it goes to show that one never really escapes this stuff,
| | + 256599 [rick.denatal] Actually in any base there are fractions which cannot be represented with a
| + 256460 [mental@ry ia] Not all numbers can be represented by an arbitrarily small number of digits, and floating-point numbers only have so many digits available (for Ruby, 53 binary digits, which is about 16 decimal digits).  In this case, the computation required more than 53 bits, so the result was approximate.
+ 256453 [ruby@an hr p] % irb
+ 256454 [gregory.t.br] It's not a bug.  It's the way floating point arithmetic works, and is
+ 256457 [mental@ry ia] This happens in all languages that use floating point to represent decimal numbers (you will get precisely the same result in C or Javascript or Perl, for instance).  Floating-point arithmetic is only approximate, so the result does not _exactly_ equal 8.97, even though it is very close.
| + 256458 [juapdiaz@gm ] ...
| + 256461 [rubylearner@] ...
| + 256782 [ shot@ho .p ] Any particular reason against using Float::EPSILON here? :)
|   256798 [apeiros@gm .] I think Float#== as it is is fine. Arguably it could use delta
|   + 256807 [gregory.t.br] I'd prefer in_delta?, but I think this is a great idea.  Maybe you
|   + 256833 [ mfp@ac .o g] Comparing floating-point values different from 1.0?
|   | 256842 [gregory.t.br] I'd say no default.
|   + 257009 [nobu@ru y- a] What about Float#neary= ? :)
|     257010 [alex@bl ck e] Float#=~ isn't being used for anything...
+ 256462 [rjprado@gm i] Yes, you are all right. It's a common problem. I have confirmed this
  256484 [lloyd@2l ve ] I tried this in Delphi, smalltalk and oracle SQL and got the correct
  256509 [matz@ru y- a] Interesting.  There are a few ways to get the "correct" result.
  + 256512 [_mwryder@wo ] A simple way to get the correct figure is to do what is used often with
  | 256514 [gregory.t.br] Much better is to store the numbers as integers and convert to
  | 256517 [Rob@Ag le on] Which are just different ways of saying "fixed point numbers" that
  | 256519 [_mwryder@wo ] I think we have a difference of understanding of what fixed point means.
  | + 256524 [botp@de mo t] # My simple calculator is more precise for some math operations than my
  | | 256546 [_mwryder@wo ] I'm not trying to denigrate the project but it looks like it is still in
  | | 256577 [gregory.t.br] Um... BigDecimal part of the ruby standard library.  What is 'alpha' about it?
  | | 256597 [_mwryder@wo ] My mistake.  When I entered bigdecimal in the search screen at Ruby
  | | + 256600 [gregory.t.br] There is also a page in the stdlib section of Pickaxe II
  | | + 256605 [Rob@Ag le on] ...
  | + 256593 [dan-ml@da 42] Basically you are thinking of
  |   256601 [_mwryder@wo ] I have been using Business Basic for over 25 years and it is what I
  |   256646 [botp@de mo t] # I have been using Business Basic for over 25 years and it is what I
  |   + 256649 [caduceass@gm] Yes, basically what you are dealing with is how the object is
  |   + 256689 [znmeb@ce ma ] As a matter of fact, the BigDecimal library comes with some scientific
  + 256534 [kubo@ji ba .] Oracle uses base 100 floating numbers.
  + 256602 [rick.denatal] matz,
    + 256679 [robert.dober] Same for Gnu Smalltalk.
    + 256898 [lloyd@2l ve ] 7.4
      256918 [logancapaldo] ...
      256953 [lloyd@2l ve ] oops!  Sorry.  Yes, it is VisualWorks 7.4

pickaxe ruby extension example.
256448 [beingthexemp] Strange, I had the extension working a while ago from the pickaxe book.

Ruby/Zoom, Yaz problem
256465 [chris.stearn] Ok, I have successfully built Yaz and Ruby/Zoom on Feisty Fawn and OS

Modular classes and avoiding extension clashes
256466 [transfire@gm] Ruby-talk: 240334
256467 [juapdiaz@gm ] ...

How do I intercept creation of fundatmental types, eg. []
256470 [mobiledurant] I'm new to ruby and I love the introspection and metaprogramming
+ 256474 [juapdiaz@gm ] ...
+ 256479 [mental@ry ia] It isn't possible without modifying the interpreter; in the latter case,
  256481 [vjoel@pa h. ] def mkary

Problem with gems
256472 [cypher.dp@gm] I just installed some gem but when I want to use it Ruby comes up with
+ 256475 [mental@ry ia] Did you require 'rubygems'?
+ 256477 [chris.stearn] require 'rubygems'
  256562 [cypher.dp@gm] Okay, now it's working.

code source
256478 [juapdiaz@gm ] ...
256511 [gregory.t.br] Can you try to explain that more clearly?  I don't think you've given
256520 [reid.thompso] I think he might want to know where to get the source code???

Unit Testing Custom Validation Method
256480 [leah@ap t. e] Hey there
256596 [leah@ap t. e] I've also tried adding this
256838 [leah@ap t. e] Alrighty, I have a solution...

string search
256487 [ja_bowen@ya ] @speed += 1 if sp.slice(8..13) == "03X16"
256490 [TimHunter@nc] @speed += 1 if (/03\d16/.match(sp.splice(8..13)))

Problems with Rubyzip
256491 [billb@ti co ] I am having a problem with Rubyzip when I try to archive numerous

Help with a common problem
256504 [Schiavi007@c] I'm a very new programmer and was reffered to Ruby from a friend.
+ 256513 [_mwryder@wo ] Have you checked your path to be sure that ruby\bin is there?
+ 256550 [shortcutter@] Did you actually install Ruby on that system...

Re: How do I intercept creation of fundatmental types, eg. [
256505 [mobiledurant] Ah, that's too bad. I was encouraged by seeing the count method show up
256507 [mobiledurant] Sorry, that does not work ... I was inheriting an orig_new in "class

Traits in Ruby
256516 [cypher.dp@gm] I just read a nice article about traits and now I'm wondering if
+ 256566 [cypher.dp@gm] Okay, maybe I should search more carefully next time :-)
+ 256655 [phillipsds@y] No idea about the future roadmap for Ruby, but this is an interesting

newbie question - undefined method `replace_session_timeout' for main:Object (NoMethodError)
256521 [warrene33@gm] I'm a newbie to ruby, and programming really...
256523 [m_goldberg@a] The Ruby interpreter needs to see the definition of
256571 [warrene33@gm] Wow. That simple. Thanks

[ANN] keybox 1.1.1 Released
256525 [jeremy@hi eg] keybox version 1.1.1 has been released.

Dynamic method creation
256526 [wilsom8@rp .] the pieces from that?  I can find how to add methods dynamically but
256528 [cdcarter@gm ] The following (untested) code should work.
256530 [wilsom8@rp .] Thank you so much! Worked perfectly!

Why doesn't rescue catch Exception by default?
256529 [smarkle@am z] When you need to raise an exception, you can use one of the built-in
256544 [drbrain@se m] Exception

Newbie Tk Problem
256536 [danielj@sl e] Windows can't find my tk84.dll when I try to
256539 [akbarhome@gm] My dear,

Looking for minimalist ruby.
256537 [soliton.list] ...
256538 [alex@bl ck e] $ cd ruby-1.8.6/
256579 [znmeb@ce ma ] There's another trick you can try -- before the ./configure, type
256583 [alex@bl ck e] gcc -Os -fomit-frame-pointer  -DRUBY_EXPORT   -rdynamic
+ 256617 [vagabond@ca ] I think ruby *really* doesn't like to be built with optimizations. I
| 256634 [znmeb@ce ma ] znmeb@DreamGate ~/ruby-test/ruby-1.8.6-p36 $ set|grep CFLAGS
| 256647 [alex@bl ck e] Me too.  Mine's an Ubuntu Dapper install on a P4, gcc version 4.0.3
| 256695 [znmeb@ce ma ] $ export CFLAGS='-Os -fomit-frame-pointer -march=athlon-tbird'
+ 256625 [nobu@ru y- a] use -fomit-frame-pointer.
  256648 [alex@bl ck e] It's not just that...
  + 256674 [bulliver@ba ] $ export CFLAGS="-Os -fomit-frame-pointer"
  + 256688 [znmeb@ce ma ] 1. As far as I know, you don't need "-fdisable-frame-address". Mine is

Re: eval going boom
256540 [ryand-ruby@z] => CommandsIShouldNeverEval
+ 256612 [fxn@ha hr f.] You don't even need #to_sym :-). Note that rewrite has the side-
| 256623 [fxn@ha hr f.] Not really, update_attribute() bypasses validations by default, it's
+ 256659 [apeiros@gm .] Do you tell that your customers too?
  256704 [apeiros@gm .] I don't think it was rude. Assuming your application is in some way
  256705 [gregory.t.br] I thought Giles was joking...

Everything in ruby is an object?
256541 [mark.gargan@] Hey folks,
+ 256548 [jan.svitok@g] No. Expressions are not objects. Objects are true and false, and && ||
| 256553 [gpygood@12 .] class A
| 256555 [mark.gargan@] Thanks a million folks. That answers that I guess.
| 256563 [TimHunter@nc] Rails? What's Rails?
+ 256549 [shortcutter@] No expression in Ruby is an object.  But results of evaluating them are

256542 [astasagie@lk] Kogda nastanut holoda i belaja doroga ljazhe. Nastasia Griet.
256585 [onebitcipher] ...

from the ruby book install on win32
256551 [dglnz@ya oo ] Though i'd give ruby a try :)
256564 [lyle.johnson] You saved the file as "Song.rb" and you're trying to run a file named
256638 [dglnz@ya oo ] Bugger!!!
+ 256670 [lyle.johnson] Right. When you say "the Ruby book that comes with Ruby 1.8.6 win32",
| 256767 [dglnz@ya oo ] You are correct. Also i know that this was the first edition so i
+ 256672 [robert.dober] Relax these things happen all the time, I remember debugging a file

ruby equivalent of htons or htonl
256554 [akbarhome@gm] *(uint16_t *)(ptr+FSP_OFFSET_KEY)=htons(p->key);
+ 256630 [dave@bu t. d] We would still do htons() and hotnl() the same way.
+ 256654 [martin@sn wp] You are thinking about too low a level of porting.
  + 256665 [akbarhome@gm] That gives me insight.
  | 256730 [jeremy@hi eg] pack/unpack should take care of that for you.  I whipped up this sample.
  + 256746 [vjoel@pa h. ] bit-struct wouldn't be useful for a line-by-line translation.

avoiding nil.methodcalls short and cheap
256556 [rossnet@gm .] I often have to check if a methodcall A is not returning nil before
+ 256557 [farrel.lifso] textvalue = (text = xmltag.get_text) && text.value
+ 256558 [akbarhome@gm] begin
+ 256559 [eeklund@gm i] Variations using just logic operators and conditionals - I think the
| 256567 [hramrach@ce ] I would avoid code that relies on logical operators to preserve values.
| 256568 [eeklund@gm i] And I would strongly disagree with this.
| 256888 [hramrach@ce ] Not always. It is defined behavior but unless you work exclusively in
+ 256588 [transfire@gm] get_text  = xmltag.get_text
| 256590 [rossnet@gm .] Thanks for quick and helpful answers! I hope all of you will have a
+ 256650 [martin@sn wp] Since no one has pointed this out, I'll remind you that this *is*
+ 256662 [dan-ml@da 42] textvalue = xmltag.get_text.ergo.value
  + 256667 [transfire@gm] Interesting... I like this. Nice use of fluent / magic dot notation.
  | 256744 [dan-ml@da 42] Indeed, that really simplifies the code.
  + 256877 [eeklund@gm i] (... deleted ...)
    256986 [dan-ml@da 42] cogito = [2,2]
    257018 [eeklund@gm i] I know that (ergo is commonly used in my native tongue), I just didn't
    257038 [dan-ml@da 42] Sorry, it seems I misunderstood the question. But I don't know what more

[ANN] rcodetools 0.7.0 (TDC: "test-driven, 100% accurate completion", automagic assertions/specs, doc/code navigation...)
256560 [ mfp@ac .o g] rcodetools is a collection of Ruby code manipulation tools. It includes

Howto add automatically a soap header in soap4r?
256565 [henning.pank] I must access a webservices that expect the SOAP action as a soap

[ANN] rocaml: Ruby extensions in Objective Caml
256569 [ mfp@ac .o g] rocaml allows you to write Ruby extensions in Objective Caml.
+ 256572 [benjohn@fy h] a quick thought that I'm pretty sure you've already had: I notice that
| 256677 [ mfp@ac .o g] Even though the types are known by the compiler, human intervention is needed
| 257020 [benjohn@fy h] *snip*
| 257157 [ mfp@ac .o g] If you mean by this that performance is easy to predict, you're very right :)
+ 257014 [martindemell] exciting stuff! looking forward to playing with this.
+ 257062 [rubyfan@gm i] Nice.  I've been learning OCaml for the last few months.  I'll

Anyone, anyone...Bueller?
256573 [greg.kujawa@] There's a Rubyforge project I admin that I unfortunately don't have
256578 [james.britt@] reference to some character in a movie.
256592 [greg.kujawa@] True. Of course anyone who knows Ruby and is interested in TSAPI

What happened to Net::HTTP::Options ?
256582 [onebitcipher] ...

eval, bindings and scope
256586 [hellfeuer@gm] hey
+ 256608 [m_goldberg@a] It will work if the local variable has been defined before the Proc
| 256614 [hellfeuer@gm] hmmm.. thnx. ur right. but even accepting that thats just how closures
| 256626 [m_goldberg@a] There is nothing in your lambda to establish a binding for b.
+ 256633 [sami.samhuri] A nice one too. I learned quite a bit from it so thank you.

How do I find out what Exceptions a class may raise
256589 [funkytwig@gm] at Been using the ActionMailer class, i.e.

assign greater of two ints?
256603 [eclubb@va co] Is there a more concise way to write this?
256604 [donald.ball@] a = [a, b.length].max
256607 [eclubb@va co] Excellent.  Thanks.

Is $! thread safe?
256618 [erikveen@gm ] Is it?
+ 256619 [mental@ry ia] Each thread gets its own private $!, so yes.
| 256621 [gregory.t.br] Is that a special case for built in globals?  I'm assuming so, but just curious.
| 256622 [vjoel@pa h. ] No, only for a subset of them, including $SAFE and the pattern matching
| 256627 [gregory.t.br] Ah, the pattern matching vars were actually the ones I was interested
+ 256620 [vjoel@pa h. ] Exception Information
  256642 [erikveen@gm ] Page 319 of Pickaxe v2 doesn't tell me anything about
  256686 [vjoel@pa h. ] Sorry about that. I didn't expect that the PDF and the printed copy

xml newbie
256624 [bladenut@gm ] Okay, so I am scraping the FAA site and keeping track of some airplanes.
+ 256628 [gregory.t.br] You'll want to take a look at HPricot[0] and/or XML Builder[1]
+ 256635 [cardboard42@] Why bother with xml at all? For something this small YAML would work
  + 256636 [cardboard42@] On Jun 23, 12:16 am, "cardboar...@gmail.com" <cardboar...@gmail.com>
  + 256637 [gregory.t.br] Oh, for some reason I thought the OP was scraping XML files and wanted

Performance: Module vs Class
256629 [jnj@th co pe] Is there a significant performance difference between these two ways to
+ 256669 [jnj@th co pe] Apologies! I had meant to start a new thread.
| 256673 [m_goldberg@a] IMO that's not a good reason. The main reason for grouping methods
+ 256699 [gregory.t.br] You don't need to use ::, that's mostly meant for constants and nested
  256701 [robert.dober] And to round up the picture and to keep David happy ;)
  256703 [gregory.t.br] sure. It's fairly OT from what was asked for though, but while we're here

RubyGarden regularly down
256631 [erwin.abbott] It seems every time I try to bring up a page on http://rubygarden.org,

ANN: yummy 0.0.2 has been released
256632 [bryanliles@g] yummy version 0.0.2 has been released!

offer jersey as NBA,MLB,NFL,NHL,football jersey,basket ball
256639 [shoeso_1999@] our company wholesales shoes ,clothing,IPODS MP3,MP4, as nike,jordan,

Re: offer jersey as NBA,MLB,NFL,NHL,football jersey,basket b
256640 [shoeso_1999@] our credit. If the products can be not delivered to your address as

Cannot dump FeedNormalizer Feed objects using YAML
256641 [demerzel@gm ] I'm downloading and parsing an RSS/Atom feed using open-uri and
256643 [andy@ti ne f] Either use Marshal.dump instead, or set parser to nil on the feed object
256644 [demerzel@gm ] Ah, so that's what I need to zero out. I need to use YAML because I

Read individual words from input?
256645 [keriostar@gm] I'm a semi-newbie C++ programmer and a total newbie Ruby programmer, so
+ 256651 [rrafje@gm il] ...
+ 256652 [has.sox@gm i] ...
| 256657 [dblack@wo bl] words = File.read("words.txt").split
+ 256658 [apeiros@gm .] Alternative if you want to avoid having interpunctuation and other stuff

Ruby on rail is fast?
256653 [howachen@gm ] i have been using our custom framework for apps development, and
256661 [TimHunter@nc] You'll probably get better answers on the RoR mailing list. You can find

What is the last argument to rb_attr() ?
256656 [djberg96@gm ] What is the last argument to the rb_attr function exactly? I looked at
256758 [nobu@ru y- a] Follows the current visibility if it is non-zero.