147010-147397

146802-152275 subjects 147207-148047

How to use Test::Unit::Assertions from class methods?
147010 [michael@sc u] For unit tests I've written a mock object that should check its
+ 147015 [surrender_it] IIUC, the #extend method is what you need, instead of #include
| 147018 [michael@sc u] Yes, thanks, that is it. I've found a short note to that effect on p.385
+ 147017 [mrcode@ne ro] require 'test/unit'
| 147023 [michael@sc u] No, that's not a problem. I'm using the class only in unit tests where
+ 147019 [acharlieblue] Include them in the mock class's singleton class.
  147024 [michael@sc u] Thanks, yes, that works, too. I'll need to work with the Ruby object
  147063 [vjoel@pa h. ] Using #include on the class's signleton class is the same as using
  147072 [daniel@br ck] Exactly.

Mechanize:  Can't get it to work.  Can I help make it work next week?
147012 [xeno@es im .] This may be just one more play where my lack of experience with Ruby is biting
+ 147014 [james_b@ne r] Looks a like a gems issue, and trouble loading the 'https.rb' file
+ 147016 [mrcode@ne ro] It works fine for me.

[ANN] dirwatch-0.9.0
147022 [Ara.T.Howard] ===============================================================================
+ 147025 [james_b@ne r] Very, very nice.
+ 147049 [graham@in a.] To pick up an earlier thread - "will it run on Windows?" - I guess
  147069 [Ara.T.Howard] yeah... i lost (accidentally deleted) the email from you.. sorry.  the
  147074 [phurley@gm i] You might want to check out change notify from Win32 Util stuff at
  147079 [graham@in a.] <554ac39c05070219057ec18b2c@mail.gmail.com>
  147082 [Ara.T.Howard] dirwatch basically emulates (and adds) to this functionality, which is

jabber4r brokenness
147040 [luke@wo th i] require 'jabber4r/jabber4r'

ruby-ldap: bind authentication problem
147042 [boris@bo is ] first of all: my problem is connected with ldap, but maybe you can help me
147052 [boris@bo is ] I found it out myself: The trailing newline was the problem.
147073 [greg.kujawa@] That's why strings have the chomp! method which (rather than returning

Loading a file without cluttering the global namespace
147044 [benjamin-hep] I'm trying to build a module-mechanism in ruby so that I am able to load a
+ 147045 [halostatue@g] Not cleanly. There's a few examples of wrapped loads that allow you to
| 147046 [benjamin-hep] Where can I find those examples? I don't know what to search for.
+ 147048 [andrew@wa ro] # Packages is a container class for all package classes.
| 147051 [benjamin-hep] Thanks so far.
+ 147064 [vjoel@pa h. ] It cannot unload a library, and it cannot change what namespace .so
+ 147068 [Ara.T.Howard] i use a similar pattern for loading 'subscriptions' in our near-realtime
+ 147083 [bob.news@gm ] Did I overlook something?
| 147085 [andrew@wa ro] WRT below, see above. Caffeine topup required, perhaps?
| 147090 [bob.news@gm ] Darn!  I knew it had to be something trivial... :-)
+ 147109 [benjamin-hep] Thanks to all the replies.

A Ruby MUD client
147055 [sy1235@gm il] Tyler, I've BCCed you because I saw your (then-unresolved) interest in

class variable leading a double life
147056 [amarison@ho ] Can someone please explain why the @var variable leads a double life? One
147059 [james@gr yp ] @var refers to an instance variable of the current "self" object.
+ 147060 [brent.hughes] I thought that Test.inc was a class method that could be called without
| + 147062 [halostatue@g] Ruby isn't Java or C++; in Ruby (like in Smalltalk, I think),
| + 147071 [eustaquioran] There is an "internal", if makes it easier to understand, representation
+ 147066 [twifkak@co c] OK, now I'm confused. I had thought that class variables were just
  + 147070 [james@gr yp ] We already have a syntax for instance variables, so that's what you
  | 147084 [bob.news@gm ] Let me add to that that usually you want to associate a variable with the
  | + 147097 [eustaquioran] Hey Robert!
  | | 147099 [bob.news@gm ] I'm not sure about "more clear" with your example... :-)
  | | 147115 [eustaquioran] Hey Robert. :-)
  | + 147102 [twifkak@co c] Indeed. I figured out why my code sample didn't work. Ruby considers it
  |   + 147104 [eric_mahurin] I agree.  Class variables should just be a shortcut for
  |   | + 147107 [twifkak@co c] And *weird*.
  |   | + 147130 [eustaquioran] That was confusing me. The way it should be that shortcut, because they
  |   | + 147138 [dblack@wo bl] That's a breakage of encapsulation, though.  In its capacity as "just
  |   |   147148 [eric_mahurin] I don't think this is too much different than how it is now -
  |   + 147121 [bob.news@gm ] As far as I remember even Matz agrees that class variables are awkward.  I
  |     147131 [eustaquioran] That will lead to a really more clean thing. :-)
  + 147137 [dblack@wo bl] every object can have instance variables (including Class objects),

Dynamic languages and the CLR
147057 [michael.camp] I found an interesting blog article about dynamic languages and how

Open Source Software Directory
147061 [ferdy@ou we ] www.WebOpenSource.com. It's a open source software directory, contains

irb configuration settings
147075 [chuck.brotma] In IRB tips and tricks on rubygarden.org we are instructed to add some
147078 [nohmad@gm il] '~' is a synonym for $HOME in Unix(maybe shells?). $HOME is same as

FlipFlop Voodoo
147076 [nugend@gm il] So I was reading through the retrospective on RedHanded today and saw
147105 [zoso@fo on e] Typo here ------------------------------------------'
147111 [nugend@gm il] I think you're wrong here in that you've misunderstood what the
147112 [michael.camp] The second "?" should be ":".
147116 [hal9000@hy e] So, you've got something against pedants?  ;)
147140 [nugend@gm il] Whoops, you're right about that Michael, the carat being near the

YubNub rdoc command
147077 [greg7224@gm ] I created a YubNub rdoc command.
147081 [james_b@ne r] grd String
147094 [greg7224@gm ] I like being able to go right to the class documentation, but that is

tkextlib and Unicode
147080 [anieden@gm .] I need to quickly decide if a medium-sized application can be converted
147091 [nagai@ai ky ] I'm very sorry. That is a bug on converting from an array of
147092 [nagai@ai ky ] If you use 'UTF-8' and 'ASCII' strings only on your application,
147093 [nagai@ai ky ] Then, probably, you don't need to edit your script to use
147143 [anieden@gm .] You are right, adding

Ruby/Gosu
147086 [netikular@gm] I am currently trying to get Ruby/Gosu working on my Gentoo system.  I
+ 147096 [florgro@gm i] This seems to be a known bug that only rarely occurs on some systems.
| 147100 [netikular@gm] Good to know that I'm not the only one I thought I was going crazy...
+ 147101 [gfb@to es ft] Ruby handles all signals by itself. It is great most of the time
+ 147103 [max@os -i st] I'd recommend gdb.
| 147125 [netikular@gm] Thanks for you guys help, I'm new to gdb and did not know about the bt
| 147183 [pavel_vozeni] If you identify bug in Boost, please send email on
+ 147155 [jan.luecker@] I'm the person who ported Gosu to Linux. This segmentation fault also
+ 147177 [julian@ra ch] Hey,

two questions: one for XML Builder, one for ERB.
147089 [chenge2k@gm ] 1.
+ 147108 [acharlieblue] Yep. Builder uses method_missing to dynamically create markup methods
+ 147122 [jim@we ri hh] The following articles talk about builder ...

warning: refine foo, what!?
147106 [mgarriss@gm ] I've been doing some unit tests with ruby -W.  Wow did I have a lot to
+ 147110 [daniel@br ck] It's not that simple, because `undef_method' doesn't remove methods;
| 147113 [mgarriss@gm ] ah, thank you very much.  see, it was the former.
+ 147120 [bob.news@gm ] Do you want your head fixed? :-)
+ 147134 [nobuyoshi.na] I think it's the latter, because it doesn't appear when

calling an arbitrary superclass method
147114 [eric_mahurin] Anybody know of a way to call an arbitrary method in the
147117 [logancapaldo] self.class.superclass.instance_method(:some_method).bind(self).call
147118 [eric_mahurin] That is the magic I was looking for.  Thanks.
+ 147119 [eric_mahurin] Forgot the bind(self).  Added it above.
+ 147146 [redentis@gm ] What scenario(s) do you think this would be useful in? Surely the whole
  147149 [eric_mahurin] That is exactly what I want to do.  I want to be able to call
  147152 [bob.news@gm ] But then what do you need the explicitely selection of the class for?

[ANN] Precedence 0.8
147124 [farrel.lifso] I've just released Precedence 0.8. This is a combined release with 0.7
147126 [florgro@gm i] What is a precedence network?
147141 [farrel.lifso] It's a tool used in project management. You have a number of

[ANN] Ruby-FLTK 0.9.2
147127 [jeremy@ch os] Ruby-FLTK 0.9.2 , 2005-07-03
147128 [mailinglists] Did you cleanup enough to make it a Ruby GEM ?
147173 [jeremy@ch os] I don't know what it would take to make it a gem.  Luckily I just

Stats comp.lang.ruby (last 7 days)
147129 [bsd.SANSPAM@] Stats comp.lang.ruby (last 7 days)

telnetting cisco routers/devices
147136 [botp@de mo t] I'm having difficulty telnetting properly cisco devices. I googled the net
+ 147142 [jeffm@gh st ] Just a dumb question to begin with - what have you tried? Net::Telnet?
| 147144 [botp@de mo t] #Just a dumb question to begin with - what have you tried? Net::Telnet?
+ 147161 [nospam@lu ac] Here is what I did to access some information on a Cisco Access Point
  147187 [botp@de mo t] #Here is what I did to access some information on a Cisco Access Point

ruby-dev summary 26325-26385
147139 [maki@ru yc l] This is a summary of ruby-dev mailing list in these days.

net/telnet session times out
147145 [wybo@se va y] I'm trying to run a telnet session with my adsl modem with
147188 [botp@de mo t] #I'm trying to run a telnet session with my adsl modem with
147194 [wybo@se va y] ...
147197 [botp@de mo t] #Subject: Re: net/telnet session times out

Abort a system call
147147 [masschel@im ] ...
+ 147150 [bob.news@gm ] Without trying out: maybe you have to explicitely set a signal handler for
+ 147151 [bob.news@gm ] ...
  147209 [masschel@im ] With parts of other pieces today on the reflector, I assembled this
  147210 [masschel@im ] To clarify: the procedure between the trap brackets gets executed when I press Ctrl-C, and the pid in the printed text matches the one of the executable called from within the ruby script... was a bit ambiguous when I just reread it.
  147212 [masschel@im ] For those having similar problems, I just solved it by
  147220 [guslist@fr e] Here is what I think is going on. Ruby sets up the signal handler so
  147230 [masschel@im ] Wow. A lot of magic going on behind the scenes... I have to catch up big time ;-).

Ruby under Cygwin problems
147153 [usenet@za ie] Whatever Ruby module I want to install under Cygwin I always get the same
+ 147154 [masschel@im ] Whatever Ruby module I want to install under Cygwin I always get the same
| 147205 [usenet@za ie] It solved the problem. Tnx.
+ 147186 [daniel@br ck] Sounds like someone is using `-rubygems' instead of `-rrubygems'.
  + 147190 [halostatue@g] Except that in a RubyGems installation, there's an ubygems.rb that
  | 147206 [usenet@za ie] Yes, I have. After unseting RUBYOPT variable I can install gem.
  + 147198 [mailinglists] No this is not the problem, it's just one more of this quick and
    + 147200 [daniel@br ck] I see...  Sort of clever.  Kind of cute.
    + 147236 [karlin.fox@g] I agree whole-heartedly that this is a silly hack.  In introducing
      147239 [mrcode@ne ro] I personally haven't noticed any problems with this "hack" as you guys
      + 147241 [curt@hi bs c] You can tell the One-Click Installer not to prepend "rubygems" to the
      | 147264 [mrcode@ne ro] Cool. Then I guess the main problem is most people are not aware of this,
      | 147276 [faker@ya oo ] I ran into this problem at work. I was trying to do some ruby programs to
      + 147303 [mailinglists] RubyGems is still a hack, or lets say it politely a prototype.
        147311 [chneukirchen] If you decide to go this way, please make sure you also publish your
        + 147312 [aredridel@nb] Heartily, heartily seconded. That way, if someone who works on a linux
        | + 147313 [dblack@wo bl] Well, that's a little misleading, since the first two steps for gems
        | + 147316 [chadfowler@g] What is your _suggestion_?  Does anyone have anything productive to add?
        | | 147325 [aredridel@nb] Sorry for the snark. Mostly, release a tarball without a dependency on
        | + 147317 [mailinglists] Sorry where is the problem ?
        | + 147318 [mrcode@ne ro] I set up Ruby, RubyGems and Rails on my new Gentoo box without any
        + 147314 [mailinglists] Sorry i don't understand your argument. If gems are not installed
          147328 [chneukirchen] And if there was a tar.gz not depending rubygems, I could just grab it
          147330 [mailinglists] If they add the path by hand to the RUBYLIB environment variable they
          147332 [james@gr yp ] Well said.  I agree 100%.

Add methods to a predefined class: on the class instance or metaclass?
147156 [eustaquioran] When I do
147158 [bob.news@gm ] You're adding them to class Foo so instances of Foo can use them.  If you
+ 147166 [eustaquioran] Thanks again, Robert. :-)
+ 147229 [lukfugl@gm i] Note that the last form (class << Foo) doesn't need to be inside the
  147231 [bob.news@gm ] The same is true for variant 1 also.  I prefer the nested versions with
  147246 [twifkak@co c] Note, also, that if you don't wrap it in 'class Foo; end', you don't have access to the class @@variables of Foo.

[SOLUTION] Inference Engine (#37)
147157 [p.capriotti@] Paolo Capriotti
+ 147159 [alawi2@ei .a] OK
| 147162 [p.capriotti@] why not?
| 147164 [mailing-list] A вк B doesn't imply B вл A,
| 147165 [mrcode@ne ro] But here the rules are being set up, and the above relationship is being
| 147167 [alawi2@ei .a] using the quiz web page as a source for testing. and selecting from the
| + 147169 [james@gr yp ] No cats are dogs.  (After:  All cats are mammals.)
| + 147216 [erlercw@gm i] ...
+ 147257 [pit@ca it in] ...

ANN: ContextualService 0.1.0
147160 [sera@fh an .] Here's another library that comes from Lafcadio: ContextualService.
147163 [demetriusnun] Could you contrast Lafcadio to ActiveRecord?
147179 [sera@fh an .] Sure, though I should point out, in case there's any confusion, that
147185 [jeremy@bi sw] The dynamic finder methods are more easily mockable.  E.g.
147213 [sera@fh an .] No, Lafcadio doesn't support transactions, since I haven't worked on

Finding all paths in an XML document
147168 [nospam@lu ac] I'd like to know how you would search for all the paths of an XML
147203 [bob.news@gm ] require "rexml/document"
147223 [nospam@lu ac] That worked fine.

REXML and namespace axis troubles
147171 [nugend@gm il] I've been trying to use the namespace:: in an XPath query to get at

Exececuting another application from within ruby
147174 [nigel@wa pz ] I have a smell application from which I wish to display a file using an
+ 147175 [Ara.T.Howard] def background command
+ 147178 [vjoel@pa h. ] Thread.new {system(app, file)}
  + 147184 [Ara.T.Howard] acutally, even if you do joel's may work
  | 147201 [masschel@im ] This is maybe a good thread to re-ask a question I had yesterday... I 'guess' it's somewhat related. I have problems with aborting an application started from within ruby using the system() call. I cannot simply press ctrl-C, like in Perl. I use Ruby to run a testbed of several sequences, and when I see that sth went wrong, I want to stop the processing. Now, the only way is to -kill xxx- the process. The suggestion was to redirect the SIGINT, and I tested this thingy using
  + 147202 [B.Candler@po] 1. fork
    + 147204 [nobuyoshi.na] If the parent program terminates before the child, you don't
    | 147302 [B.Candler@po] It's clear that if the exec succeeds then no at_exit handler can possibly be
    + 147215 [Ara.T.Howard] # almost positively want 'exit!' here no?
    + 147234 [vjoel@pa h. ] Not on windows. There's no fork(), so ruby uses CreateProcess to
      147263 [nigel@wa pz ] Thanks everyone, I'll have a play when I get a bit of time.

Ruby2c and large numbers
147176 [drosihn@gm i] there is one thing about the example on page 25 (of the pdf)
+ 147238 [drbrain@se m] You are correct.
| 147324 [drosihn@gm i] It would be nice to at least detect that an overflow occurred, even
+ 147277 [ryand-ruby@z] I'm afraid that in your "concern" you missed the whole point of that

Observer patch
147180 [nornagon@gm ] ...
+ 147195 [nornagon@gm ] Hmm, I just noticed that the patch appears as a big unreadable string
| 147199 [mailing-list] Well, any MIME-aware MUA will be able to read it correctly.  GMANE
+ 147196 [daniel@br ck] I think this is a useful and sensible addition.
+ 147397 [nornagon@gm ] If nobody objects to this patch, I will post it on ruby-core and try

[ANN] OWLScribble 0.8
147181 [gavin@re in ] As noted in passing in another post, I'm writing a library (like

[ANN] TagTreeScanner 0.6
147182 [gavin@re in ] "The TagTreeScanner class provides a generic framework for creating a
147208 [tksano@gm il] I'm very interested in this library, but where can I download it? It
147227 [gavin@re in ] ...
147278 [tksano@gm il] Oops, I overlooked that link. Thanks!

[SOLUTION] Inference Engine (#37)
147189 [daniels@pr n] ...
+ 147191 [daniels@pr n] Sorry for anybody that was eager to get it, I put up the wrong file.
+ 147192 [p.capriotti@] OK.
  147193 [daniels@pr n] Thanks, fixed now.
threads.html
top