281428-379106 subjects 281787-344488

[Mac OS X] WARNING: multiple libruby.dylib
281587 [unbewusst.se] ~/work/Ruby/Growl%> ./essai_mygrowl.rb

alias problem
281589 [bad_good_lio] is there any idea to change public definition to private definition by
281594 [phrogz@ma .c] Slim2:~ phrogz$ qri private
281672 [bad_good_lio] hey please understand my question correctly
281697 [m_goldberg@a] I don't believe you can do what I think you want with 'alias'. Maybe =20
+ 281704 [bad_good_lio] thats what i want .
+ 281705 [bad_good_lio] actualluy all ruby classes are not closed (we can add anything at any
| 281706 [sepp2k@go gl] Classes are objects, too. SomeClass.freeze works just fine.
+ 281898 [olsonas@gm i] You could also do something similar to to Morton's solution, but on the

question about iterator
281591 [paulus4605@g] dear
+ 281596 [dblack@ru yp] You're using a non-existent method, "cursus_java?" You probably want
| 281597 [paulus4605@g] david thanks for your help
| 281606 [caduceass@gm] Ruby doesn't know how to compare Cursus objects.  You must tell it how
| 281611 [dangerwillro] Even consider this, simply have class Cursus inherit from another
| + 281618 [paulus4605@g] when I do a sort like this it's working correctly
| | + 281619 [dblack@ru yp] a <=> b
| | + 281639 [MonkeeSage@g] Like others have mentioned, you're calling <=> on an instance of class
| |   281674 [paulus4605@g] THanks Jordan
| |   281702 [MonkeeSage@g] Glad to help. One more thing: it would probably look nicer to hide
| |   281819 [shortcutter@] Just a few picky remarks. :-)  Sorting on the string representation,
| |   + 281826 [MonkeeSage@g] I agree with you. In fact, I would have probably implemented the
| |   + 281856 [jari.william] And how about performance on using to_s when sorting? Each time an
| + 281676 [dblack@ru yp] The problem, though, is that you don't need Cursus objects to know
+ 281598 [shortcutter@] I would not use partition but a custom order.  It might also be helpful

Identifying a volume as being an iPod
281603 [dangerwillro] Does anybody know how to identify a mounted volume as being an iPod ?
+ 281609 [tmacedo@st d] An iPod (at least when formatted in FAT32 will contain an "iPod_Control"
| 281626 [dangerwillro] The device ID info is in the right vein for what I'm thinking of.
| 281633 [MonkeeSage@g] On Dec 1, 3:40 pm, John Joyce <dangerwillrobinsondan...@gmail.com>
| 281644 [dangerwillro] Interesting, ieee1394 is FireWire, but iPods haven't shipped with
| 281700 [MonkeeSage@g] On Dec 1, 5:31 pm, John Joyce <dangerwillrobinsondan...@gmail.com>
| 281738 [dangerwillro] Thanks! I know, it's intentionally cryptic.
+ 281673 [dangerwillro] Well, I've found better stuff to work with, more practical anyway.
+ 281737 [dangerwillro] No contradiction there, I said "might not contain track info
| 281775 [dangerwillro] After spending some time with AppleScript for a day or two now in my
| + 281797 [dangerwillro] I too wonder if Apple is or isn't cooking up some kind of appleScript =20=
| | 282045 [has.temp3@vi] On 3 Dec, 03:41, John Joyce <dangerwillrobinsondan...@gmail.com>
| | 282470 [dangerwillro] Thanks has,
| | 282577 [has.temp3@vi] On 7 Dec, 03:58, John Joyce <dangerwillrobinsondan...@gmail.com>
| | 282646 [dangerwillro] Has, thanks again,
| | 282668 [has.temp3@vi] On 8 Dec, 00:36, John Joyce <dangerwillrobinsondan...@gmail.com>
| | 282744 [dangerwillro] Wow, excellent has!!
| | 282842 [has.temp3@vi] On 9 Dec, 00:17, John Joyce <dangerwillrobinsondan...@gmail.com>
| | 285302 [dangerwillro] Giles,
| + 282036 [has.temp3@vi] On 3 Dec, 01:29, John Joyce <dangerwillrobinsondan...@gmail.com>
+ 282035 [has.temp3@vi] On 1 Dec, 17:26, John Joyce <dangerwillrobinsondan...@gmail.com>

rdoc/ri feature request
281608 [dangerwillro] I know it's selfish, but...
281617 [vjoel@pa h. ] There's the gem server ("gem help server" for details), but I prefer a

How to alias only one time, in an eval string.
281610 [mrobert@tr b] I'm using a software which use compressed ruby scripts... For that, the
281613 [ara.t.howard] wrapped =

Why are "Array#push" and "pop" not "push!" and "pop!"?
281612 [rbysamppi@gm] As a novice in Ruby, I love its elegance and consistence; it's now one
281614 [pergesu@gm i] ! doesn't signify a mutating method, it signifies a destructive
281615 [dblack@ru yp] David
+ 281625 [dangerwillro] some languages and libraries include silly or useless things to
| 281636 [significants] this is a comment I agree with, that I haven't been able to articulate
+ 281630 [MonkeeSage@g] "Dangerous" seems kind of ambiguous. Does it mean that the code does
  + 281642 [MonkeeSage@g] In thinking about it a little bit and looking at the stdlib, I think
  | 281649 [dangerwillro] To put it another way, consistency for consistency's sake alone is
  | + 281652 [significants] so the next question is do you think those could be useful additions?
  | | 281665 [dangerwillro] Like I said, my top-posting pal, if Ruby had immutable classes...
  | + 281678 [dblack@ru yp] I think the whole question of what the best names were for those
  |   281934 [dangerwillro] I understand where you're coming from completely with the tradition
  |   281990 [dblack@ru yp] def greet!
  |   281998 [MonkeeSage@g] Well...99% of the time it is, except when the ! only serves to
  |   + 282005 [MonkeeSage@g] String#succ!, Array#reverse!, Array#collect!, Array#sort!
  |   | 282013 [dblack@ru yp] In-place modification is, I think, definitely the most common form of
  |   | 282020 [shevegen@li ] That is not true. I agree that it should not be used
  |   | 282039 [dblack@ru yp] Not that I've heard. I'll defer to Matz on that one.
  |   + 282012 [dblack@ru yp] I'm not sure I follow, so this may not be relevant, but in-place
  |     282018 [MonkeeSage@g] Don't mind me, I'm just over-analyzing. ;P After remaking that
  + 281677 [dblack@ru yp] It varies. Just think of it as a "heads up". It means that you need to
    281680 [billk@ct .c ] recently that has no non-! counterpart.  A non-! counterpart
    281683 [dblack@ru yp] My immediate thought, as a user of the method, would be: why? :-) If
    282041 [billk@ct .c ] Exactly.  Then I would feel I've succeeded in using the bang
    282052 [dblack@ru yp] I know what you mean about ri, but I check ri (or equivalent) for
    282059 [billk@ct .c ] Ah.  I think I understand your viewpoint better now; thanks.
    282070 [cvonkleist@g] Well, slice(-1) and slice!(-1) are equivalents for pop (non-modifying)
    282074 [MonkeeSage@g] Well...that's kind of cheating. Heh. ;) Semantically, they are very
    282078 [cvonkleist@g] Good point.  :)
    282141 [dblack@ru yp] array.clear!

[ANN] csspool 0.2.1 Released
281616 [aaron@te de ] csspool version 0.2.1 has been released!

Re: Postfix to Infix (#148)
281640 [rubytraining] Well one feature of the Ruby Quiz is that our Quiz Master generally
281643 [caduceass@gm] Of course.  It's not a quiz about simplification.  I just thought it
281701 [robert.dober] Here goes my solution for this Quiz, I am confident that solutions 1
281703 [eric.duminil] I'm pretty it removes every unnecessary (), at least for - + ** ^ /.
281710 [micathom@gm ] (http://www.vim.org/scripts/script.php?script_id=2040), I found this
281714 [micathom@gm ] class Quiz148
+ 281723 [ljjarvis@gm ] Well, here is my submission.. I truly was stuck with this so I just done
+ 281730 [micathom@gm ] I'm sorry for spamming this list with my inferior solutions. But J
  + 281743 [alex.shulgin] #!/usr/bin/ruby
  | 281747 [alex.shulgin] ['/', '*'] => true
  | 281830 [inuyasha.aka] ...
  + 281834 [micathom@gm ] This 4th version also passes K Bloom's testcases.
    281908 [alpha.chen@g] A pretty simplistic regex-based solution that doesn't minimize

how do I  IO.read the entire thing
281648 [tennisbum200] I have a system command that im running using Popen. Im trying to read
281659 [billk@ct .c ] Omit the length parameter.   (ri IO#read)

Benchmarking JRuby
281650 [charles.nutt] For those of you playing with JRuby, if you run across benchmarks of any
+ 281662 [znmeb@ce ma ] You've got PetStore running faster than 1.8 now??
| 281663 [charles.nutt] I don't think it's quite there...and it ought to be, so there's
+ 281995 [mike.s.mckin] ...
  282066 [charles.nutt] Yeah, and Antonio's numbers don't even reflect true performance after

irb and unix shells
281653 [robertjones2] Can you use irb in place of shells like bash or rc?
+ 281711 [cameron.mcbr] This is one of those questions where consulting with rubyforge.org can
| 281728 [shevegen@li ] hehe working on that with my limited abilities...;)
| 282114 [csaba.henk@g] Pope stands for "Powerful Piping Environment", a ruby implementation
| 282117 [fedzor@gm il] Once again, since people are really getting into this, I ENOURAGE YOU
| 282169 [fedzor@gm il] I will wait until your blog has comments and I will troll them
+ 281866 [devi.webmast] A group of developers, including the author of rbsh, recently got
  + 281889 [thomas.adam2] ...
  | 281919 [edder@tk sp ] Have you guys also looked at the hotwire project (a new python-shell)
  | + 281930 [dangerwillro] I still think if it borrows lots from bash, it should be called rash,
  | | 281944 [fedzor@gm il] In honor of how Rails and Rolls are both named after drugs, I think
  | | 281948 [significants] mogok! it sounds cool, it's related to rubies, erm, and apparently has
  | | + 281989 [botpena@gm i] i'd be more excited if the shell can run on windows, too. Unix shells
  | | | + 282007 [fedzor@gm il] You're in luck - since it's Ruby based, this kind of thing would
  | | | + 282011 [MonkeeSage@g] recall, I think I also saw a native version of bash (but this was
  | | |   282019 [shevegen@li ] I think that is a bit too short-sighted in the long run.
  | | |   282022 [james@gr yp ] They have totally different focuses.  I can see saying that Ruby is
  | | + 282006 [fedzor@gm il] First, the code. We need code to go along with this!
  | + 281947 [martindemell] scripting than interactivity.
  + 281910 [significants] excellent! can't wait for it.

Scrabble Stems Ruby Quiz question.
281666 [markonlinux@] (STEMS[stem] ||= {})[letter] = 1
281669 [yermej@gm il] STEMS[stem] = STEMS[stem] || {}
281671 [markonlinux@] The '[letter] = 1' appended to the end was the bit I didn't understand.

Warnings, exceptions, and constant modifications, redux.
281670 [Dymaio@gm il] seems to have died in 2002.  At least, this is the most info I've

[ANN] TMail 1.2.0
281679 [raasdnil@gm ] ...
281715 [fedzor@gm il] So does TMail take remote emails and make them into Ruby objects?
281721 [mikemondrago] Yes, and its an easy interface, from the manual
281788 [raasdnil@gm ] ...

Trying to download first 10k
281681 [dbitsolution] I'm using open-uri but even when I try to break out of the core loop
+ 281682 [dbitsolution] require 'open-uri'
+ 281696 [sonoflilit@g] Looking at the documentation for open-uri at
+ 281756 [konrad@ty er] charset="utf-8"

file renaming/parsing help
281684 [saltydog4791] First of all let me say that I am an absolute newb when it comes to
+ 281690 [caduceass@gm] You could make your life easy by using a Date object and the #parse method...
| 281901 [saltydog4791] Thank you so much Todd.  I integrated your code successfully and it
+ 281694 [AEtzold@gm .] Dear Mike,
+ 281763 [markonlinux@] not exactly what you're after (not sure how you intend to generate

Friend functions or classes
281686 [sunrayson@gm] ...
281724 [dejan.dimic@] Friend Functions and Friend Classes are often useful for one class to
+ 281808 [sunrayson@gm] ...
+ 281852 [coder68@ya o] irb(main):001:0> class Foo

RubyCocoa LoadError
281687 [xgiannix@gm ] Hey Rubyists,

Problem with decoding a compressed string
281692 [kpgarrod@gm ] I am writing an app in Ruby on Rails that I want to use for
281789 [MonkeeSage@g] I've no idea the format of SAMLRequest, but if you're going to feed

Using popen with 0,1,2,3,4 streams
281693 [Jan.Koprowsk] I try to run command system and get streams handlers to 0 (stdin),
281929 [nyarly@gm il] ...
282050 [tim.pease@gm] Also take a look at open4 and systemu. You can find both at the
+ 282328 [Jan.Koprowsk] Thank You for respond. I know that I can use only 3 pipes. But I think
+ 282330 [Jan.Koprowsk] out
+ 282331 [Jan.Koprowsk] out

Fwd: Please Forward: Ruby Quiz Submission
281717 [james@gr yp ] ...

gem require 'activerecord' or 'active_record'
281718 [henning.jans] I am doing my first thing with ActiveRecord (without Rails), and to
281745 [kyleaschmitt] It may have something to do with the version of ruby installed, or how
281760 [malugu.satya] ...

Re: Please Forward: Ruby Quiz Submission
281719 [james@gr yp ] I think you have a very clean implementation.  Nice work.

Scripting Outlook
281725 [rsteckly@wh ] I'm new to Ruby and I'm trying to script Microsoft Outlook to save

Running -r in IRB
281726 [contact@th r] After doing a couple of websites using Rails, I realized that my problem
281727 [sepp2k@go gl] I'm quite sure that you're being instructed to run irb with -r and not to
281729 [shevegen@li ] Or, if you are in irb, just do
281731 [contact@th r] irb(main):010:0> load 'c:\ruby4rails\99bottles.rb'
281732 [sepp2k@go gl] Because nothing in your initialize method does that.
281734 [contact@th r] Makes sense, Sebastian....thanks for the input.

RubyGems break because Ruby has both site_ruby and vendor_ruby
281739 [rayvinly@gm ] I just installed Ruby and RubyGems using MacPorts and a whole bunch of

Name this method...
281748 [rabbitblue@g] First off, if there's already a method that does this please point it
+ 281750 [fedzor@gm il] That's DEFINITELY a nice method to have around :-)
| 281751 [rabbitblue@g] Thank you!
+ 281752 [cmshea@gm il] You might want to take a look at the Duration gem: http://rubyforge.org/projects/duration/
| 281754 [rabbitblue@g] Damn it! That makes so much more sense! Just like Ruby makes the concept
+ 281798 [phrogz@ma .c] ...
  281802 [dan-ml@da 42] That approach works for a while but you can't accurately represent

eruby cutting off top / binding issue
281753 [transfire@gm] I'm trying to use ERB bound to a controlled context, and it's failing

WIN32OLE - problem with argv
281759 [wolf.rainer@] I'm having a problem trying to pass parameters by reference with
281764 [masaki.suket] I have not used OneNote 2007, so I'm not sure, but
281767 [masaki.suket] Or try to use WIN32OLE#_invoke method.
281776 [wolf.rainer@] Dear Masaki,

Generator#yield - what does it do?
281761 [ed.odanow@wo] I am confused somehow with respect to "Generator#yield". The description
281783 [MonkeeSage@g] It's for passing items *into* the generator's queue when the generator
+ 281785 [MonkeeSage@g] err...                          ^^^^^^^^ =3D "insert"
+ 281815 [ed.odanow@wo] I see - the confusion came from the usual meaning of yield: call a block
  + 281816 [dblack@ru yp] ...
  | 281822 [ed.odanow@wo] I think the documentation of the method should be a little bit extended.
  + 281818 [MonkeeSage@g] Yes... it really should be spelled differently. The idea is "send this

Rails hosting?
281762 [dsxxxxx@ya o] I am just starting with Ruby and Rails so this question is fairly academic
281771 [grzm@se sp t] That being the case, you're much more likely to find the answers you

Modules in rails? ( controllers or models?)
281765 [malugu.satya] ...
+ 281766 [fedzor@gm il] You can create a parent class that inherits from ActiveRecord or
| 281768 [malugu.satya] ...
+ 281769 [caduceass@gm] Well, from a kindergartener's perspective (namely, mine),  I would

Class Help - Accessing Parent Methods from Child
281773 [me@mi ha lb ] some trouble with classes and inheritance and the like. I've got my main
+ 281795 [phrogz@ma .c] class Reader
+ 281813 [dblack@ru yp] The variables you've mentioned (@headers and @connection) are instance

Fwd: Please Forward A Ruby Quiz Submission
281778 [james@gr yp ] ...

What are the differences between c++ and Ruby?
281779 [radhika.dudd] I would like implement multiple inheritance in java by using ruby
+ 281832 [caduceass@gm] You do understand, of course, that to answer these questions, one
| + 281833 [caduceass@gm] I should qualify ... I'm not sure this last statement of mine is
| + 281962 [john.carter@] Don't be so unhelpful... it's obvious that Ruby is like a writing desk
+ 281846 [sepp2k@go gl] 5.class #=> Integer
+ 281848 [coder68@ya o] Java does not support MI nor will it ever support MI.  In fact one of
| 281858 [shortcutter@] Mostly agree.  But: you can include any number of modules and thus
| 281867 [coder68@ya o] I stand corrected, thanks for the clarification Robert
+ 281986 [kevin.cline@] All three languages are Turing-complete, and consequently there are no
  282242 [dodecaphonic] ...
  282272 [vvangelovski] Why would you want to implement multiple inheritance in Java???
  282337 [shortcutter@] Actually you do not get *all* the benefits of MI, especially you are
  282360 [rlp1938@gm i] I'm in here late but not matter,