95273-96909

95098-97552 subjects 95525-96104

^ Cache of objects
95273 [rohitlodha h] I am trying to implement a class which is cacheable. New instances are created if they are not already in cache.
+ 95293 [dblack wobbl] I'm not sure what you mean.  If an instance has already been created,
+ 95306 [vjoel PATH.B] Easy.
  96900 [rohitlodha h] class Thing
  96901 [vjoel PATH.B] @cache is an instance variable of the class Object called Thing. It's
  96902 [rohitlodha h] @cache is an instance variable of the class Object called Thing. It's
  96903 [dblack wobbl] No, that's a class variable, which is different from an instance
  96904 [rohitlodha h] No, that's a class variable, which is different from an instance
  + 96907 [jim weirichh] @cache belongs to the Thing object.  Notice that is is defined in the
  + 96909 [gfb tonesoft] Thing is an instance of Class.

^ Congrats to /\ndy & Dave
95280 [jamesUNDERBA] Andy Hunt & Dave Thomas have won a Jolt award for their Pragmatic
95314 [dave pragpro] Thank you for that: we were up against some great books, and frankly I
95332 [    s xss.de] ok, I'll bite ...

^ TCPSocket connect timeout
95287 [bsl04 uark.e] How can I alter the TCPSocket connect timeout?  If I wanted less than
95376 [paul.rogers ] Ive used something like this before (untested)

^ calling outer-scope method of same name
95290 [billk cts.co] def spleen(a)
+ 95292 [dblack wobbl] Kernel.spleen("foo")
| 95298 [billk cts.co] $ cat test.rb
| + 95300 [dblack wobbl] No, my mistake.  I tried it in irb, where things apparently are a
| + 95301 [neoneye adsl] It seems difficult to invoke.. I tried this..
| | + 95302 [neoneye adsl] [snip weird problem]
| | | 95304 [billk cts.co] Interesting.... thanks, Simon!
| | | 95305 [billk cts.co] It seems that
| | + 95311 [aredridel nb] public :m
| |   95312 [dblack wobbl] That should be "outer", I think :-)
| |   + 95323 [discord mac.] <snip example>
| |   + 95343 [batsman.geo ] It's still better than Kernel.x in the sense that 'self' is the right one and
| + 95307 [ptkwt aracne] Shouldn't it be: Object.spleen("foo")
|   95309 [dblack wobbl] That won't change anything; the method will still be private.
+ 95294 [bill 32768.c] class Blah
+ 95341 [decoux moulo] svg% cat b.rb

^ Regexps and Unicode
95291 [assaph avaya] I'm trying to process unicode files with Ruby. These files contain

^ Re: exiting each (was Thinking about a date-matching algorithm...)
95313 [assaph avaya] class A

^ Octal in pack/unpack
95318 [lists zara.6] Is the format string in pack/unpack "sacred" (i.e. it has to be

^ Zero padding in Fixnum#to_s
95319 [lists zara.6] What about adding zero padding (rjust by "0") by specifying an optional
95321 [matz ruby-la] I prefer
95330 [lists zara.6] What about base other than 2, 8, 10, and 16 (yes, sorry, bad example. I
95333 [matz ruby-la] In that case, use rjust(16, "0"), which is designed for the particular
95336 [lists zara.6] Ok, you're the boss :-) Thanks for considering the idea.

^ YAML string range problem
95322 [matz ruby-la] require 'yaml'
95352 [nahi keynaut] _why, have you tried yaml test case in the ruby CVS?
95381 [ruby-talk wh] Ok.  I'm off on vacation for another three days, checking e-mail on my
95422 [nahi keynaut] $ cvs ann test_yaml.rb

^ Mail <=> News gateway health
95327 [dooby d10.ka] My imagination, or has the gateway software been repaired ?
+ 95344 [dblack wobbl] I think it's your imagination :-)
| 95350 [bob.news gmx] "David A. Black" <dblack@wobblini.net> schrieb im Newsbeitrag
+ 95351 [neoneye adsl] For some reason postings from David Black doesn't show up on the

^ [ANN] Kwartz (2004-03-19) released
95340 [kwa kuwata-l] I have released new version of Kwartz.
95367 [usenet andre] I would like to use Kwartz for my webforum, and I have a few
95393 [kwa kuwata-l] Andreas,
+ 95405 [usenet andre] OK, this makes sense.
| 95412 [kwa kuwata-l] Andreas,
| 95429 [kwa kuwata-l] I have just released a new version of Kwartz.
| 95453 [usenet andre] A question about sanitizing in general: is it possible to disable
| 95484 [kwa kuwata-l] No. Kwartz doen't have such feature.
| + 95490 [beast system] That's not right, <div> does, as it's a block element. It's effect is
| | 95508 [kwa kuwata-l] Really?  Oh, I have not known it...
| | 95518 [usenet andre] Thanks!
| | 95538 [kwa kuwata-l] That's an interesting suggestion.
| | 95553 [usenet andre] Presentation data (maybe presentation logic, too?).
| | 95715 [kwa kuwata-l] I implemented partial sanitizing into Kwartz.
| | 95763 [usenet andre] $ echo '#{a}#' | kwartz -s
| | 95768 [kwa kuwata-l] Maybe you are using old version.
| | 95785 [usenet andre] Yes, sorry, I accidently put the new version into /usr/bin instead of
| | 95819 [kwa kuwata-l] I implemented a feature to include presentation data file.
| | 95831 [usenet andre] Thanks for your update, everything seems to work perfectly.
| | 95866 [kwa kuwata-l] Andreas Schwarz
| | 95874 [usenet andre] That would make it possible to write a script that generates ruby code
| | 95913 [kwa kuwata-l] I created a utility script 'mkmethod'.
| | 96153 [usenet andre] yes, that looks good, however I think it would be better to return the
| | 96165 [kwa kuwata-l] It is not able to return string if you are using eruby.
| | 96385 [usenet andre] I get the following error with my template
| | 96466 [kwa kuwata-l] This is a bug about handling negative number in Kwratz::Analyzer#exec_expr().
| + 95499 [usenet andre] Any idea about when this will be? :)
+ 95473 [usenet andre] It seems that <div class="..."></div> gets removed, too, even if there
  95481 [kwa kuwata-l] It seems to be a bug of Kwartz.
  95482 [usenet andre] <div id="foo">
  95483 [kwa kuwata-l] Thanks. I reproduced. (It is a bug around nested tags.)

^ HTTP Digest auth
95345 [mike.pub lep] Is it possible to use digest authentication with Net::HTTP?
95416 [drbrain segm] I think this works, but I'm not 100% certain.  A previous revision of it

^ why yield does not set $_  ?
95349 [surrender_it] Probably I just need to sleep, but I wonder: why $_ from yield?
96844 [kristof vlee] as far as I know, $_ has nothing to do with method invocation.

^ REXML concatenation
95360 [andrew.kulin] 1) <a><b><c id='1'/></b></a>
95492 [scobianchi r] A bit clumsy, but it works (at least with the given example :-)

^ Server on Ruby
95382 [moscower smt] I have joined to this mailing list just now, and I am
+ 95383 [walker letha] If you're insistent on needint select() functionality, use
+ 95384 [surrender_it] I'd say... with IO.select :)
| + 95419 [drbrain segm] Note that select() only blocks the current thread, so if you have
| + 95439 [bob.news gmx] "gabriele renzi" <surrender_it@remove.yahoo.it> schrieb im Newsbeitrag
+ 95385 [usenet andre] =======

^ Can $LOAD_PATH be relative?
95386 [ptkwt aracne] Question based on an assertion made in another thread...
+ 95387 [ jimm io.com] You can add to $LOAD_PATH when the script starts, and those paths can be
| 95389 [ptkwt aracne] True, I could do those things, but I'm wondering how they managed to make
| 95398 [patrick.benn] Because Ruby was coded to work that way.  Why it wasn't made to do it
| + 95400 [dblack wobbl] I've always been able to install private Rubies.  I just set --prefix
| | 95403 [patrick.benn] No, I needed to define a Ruby tree that could be installed (through
| | 95452 [decoux moulo] security problem
| | 95460 [patrick.benn] ...and it wouldn't be under Windows?   Sorry, I don't buy it.  :(
| | + 95462 [decoux moulo] Where I've said that it's not a security problem under Windows ?
| | | 95463 [patrick.benn] My point being that it works differently under Windows and it is
| | | 95464 [decoux moulo] They do what they want under Windows.
| | + 95467 [sroberts uni] How (it's impossible) to find a process's executable file in Unix is a
| | | + 95468 [decoux moulo] Re read carefully my message (there is only 2 words) : I really don't
| | | + 95472 [cez-misc.rub] Well, on some operating systems it's certainly possible to find the
| | | | 95475 [sroberts uni] Even if its been unlinked? How would one do this, exactly, read it from
| | | + 95505 [patrick.benn] I posted it - look back in the thread...  I used the /proc/self/exe
| | + 95498 [lists zara.6] 1-2 weeks ago I asked the same question about a Linux binary Ruby
| + 95404 [ jimm io.com] Under Unix you specify the path at compile time. The default is
|   + 95406 [patrick.benn] Yes, I know.  This wasn't acceptable for my needs.  Thanks though...
|   + 95469 [ptkwt aracne] Is there an option to configure to make it relative like is is on Windows
|     95471 [sroberts uni] No, there is no such option, and it is not possible to reliably
|     95493 [decoux moulo] Never use a command like strings, or you'll have a surprise
+ 95411 [GGarramuno a] In a shell window, set the environment variable RUBYLIB with the list
  95451 [decoux moulo] Try it with -T1

^ Defining methods outside classes
95388 [imodev softh] I've got a little curiosity about defining methods. As far as I know (and
+ 95390 [flgr ccan.de] Moin!
+ 95397 [sroberts cer] irb(main):001:0> def foo; end
+ 95399 [discord mac.] Correct, Ruby doesn't have functions... But at tiems, Ruby's methods
  95421 [imodev softh] well, what can I say? Thank you all for your nice and quick answers ;-)

^ require resets $! to nil. Bug or feature?
95409 [batsman.geo ] batsman@tux-chan:/tmp$ cat excep2.rb
95458 [matz ruby-la] It's not defined behavior.  I just couldn't think of any use of $!

^ ri Module#included
95423 [vjoel PATH.B] singleton_method_undefined(symbol)
+ 95424 [dblack wobbl] I have the same thing.
| 95425 [ksibilev bel] The same thing is for 'ri extended'
+ 95430 [dave pragpro] It looks as if thise methods haven't been documented in the source

^ rubygems - did install went ok?
95428 [neoneye adsl] I think I have prepared my package for rubygems,
+ 95431 [discord mac.] require 'rubygems'
| 95440 [neoneye adsl] Thanks, I forgot about require_gem.. (must have been tired)
| + 95447 [neoneye adsl] I have just made the above gsub! in the rubygems release,
| + 95466 [hal9000 hype] This seems reasonable to me for now, but I would hate to
|   95501 [chad chadfow] "Alpha" would imply that you are right :)
|   95509 [rich infoeth] The only issue here is that 'require' does not modify the $LOAD_PATH
|   95510 [hal9000 hype] Certainly. I was speaking of a more distant future when the gem spec was
|   95511 [neoneye adsl] Would it be possible to execute some Ruby code at that point when the Ruby
|   95512 [hal9000 hype] It could certainly be done. But see #2 above.
+ 95486 [androflux so] I think that you have to do
  95491 [thomas_adam1] That is how I did it (tm)

^ YAML serialization of modules
95432 [vjoel PATH.B] I know _why is away for a bit, but maybe someone else can shoot down

^ [newbie] converting javascript to ruby (nested methods)
95434 [yvon.thorava] i have a script written in javascript and want to translate it into ruby
+ 95435 [discord mac.] nested method? That doesn't sound familiar. Could you post the actual
| 95437 [yvon.thorava] <script>: [42, 0] nested method definition
| + 95438 [yvon.thorava] def  doOperand(t, v)
| | 95443 [msparshatt y] what about if you try
| | 95445 [yvon.thorava] that's right, it works this way, tanxs !
| + 95441 [surrender_it] here is the prob
|   95444 [yvon.thorava] ok, tanxs !
+ 95446 [bob.news gmx] "Yvon Thoraval" <yvon.thoravalNO-SPAM@free.fr> schrieb im Newsbeitrag
  95461 [yvon.thorava] ok, i'll change that !

^ GString and XSS (Re: groovy)
95448 [lists zara.6] One interesting thing about Groovy is the GString class, which exposes
95717 [akr m17n.org] I considered similar idea for similar needs.  However I found that it
95722 [neoneye adsl] With oniguruma (Rubys new regexp engine) you can use named backreferences.
95724 [akr m17n.org] For named capture, "...#{:foo}..." can be used as
+ 95729 [surrender_it] following suggestion from flgr on #ruby-lang it would be nice to have
| 95859 [neoneye adsl] Agree.  Has this been submitted as an RCR before?
+ 95811 [akr m17n.org] str.gsub!(/(?<a>\s\w)(?<b>\w+)(?<c>\w\s)/) { c + b + a }
  95854 [neoneye adsl] Never thought of using named-captures 2 local-variables..

^ why does key=>val does not give an hash?
95449 [surrender_it] methodcall(k=>v) (method gets a {k=>v} hash)
95450 [matz ruby-la] Don't worry.  This form of methodcall(k=>v) will be given new meaning

^ dead link on ruby-lang.org, where are the std lib docs?
95456 [sroberts uni] At http://ruby-lang.org/en/20020107.html the link to stdlib-doc project
95457 [jamesUNDERBA] The stdlib docs are now hosted on www.ruby-doc.org
95459 [gsinclair so] Yes, note to ruby-lang.org maintainer: please update this link.

^ bug in Time, it wraps some dates to next month
95470 [sroberts uni] [ensemble] ~/p/ruby/src/ruby $ ./ruby -e "p Time.local(2004, 'feb', 31, 1, 1, 1)"
+ 95474 [hal9000 hype] I think (correct me if I'm wrong) this is related to the traditional
| 95476 [sroberts uni] You're correct that mktime() allows outofrange values (I didn't know
| 95477 [hal9000 hype] Oh, I see what you mean. Maybe some of this behavior needs to be
| 95478 [sroberts uni] Possibly you are thining of Date.new(), which allow negative months, and
| 95479 [hal9000 hype] Personally I think I'd like to reduce our dependence on the C lib.
| 95480 [sroberts uni] In terms of freedom from idiosyncracies of the systems C library
+ 95504 [matz ruby-la] This is caused by rather stupid (but simple) date range check.  I'm
  96070 [sroberts uni] Most APIs do strict check, I think they should all do strict check.

^ yield/block propagation
95485 [ggarramuno a] Well, rubyMEL is now a reality for the past couple of days.  I have to admit I
+ 95488 [sroberts uni] I might miss what you are wanting to do... but are you looking for the
+ 95495 [decoux moulo] well, I've not understood. This ?
  95524 [ggarramuno a] Hmm... yes.  I was not sure what syntax should a block be passed with,

^ Some minor FOX HMat bugs/feature requests
95487 [ggarramuno a] Sorry for sending them here, but I had trouble with the form on the fxruby
95526 [lyle knology] Thanks; I've just added these to the bug list at SourceForge. I'm a

^ Glitches in the Ruby 1.8.1 package
95489 [matt technor] Just so you know, I'm the guy who tends to rant about using package
95542 [ian caliban.] I put together those packages. As you have noticed, they were built on a
95558 [tom infoethe] Ian, when 1.8.2 comes out, just drop me a note and I'll mirror the new

^ [ANN] Tycho 0.0.0.7
95494 [hal9000 hype] Tycho continues to evolve with painful slowness and accrue
+ 95496 [msparshatt y] I've just installed Fox and FXRuby so that I can try this out and what
| 95497 [msparshatt y] A slight correction. Clicking on new note does create the data file for
+ 95503 [curt hibbs.c] I hope that this is an unintended misstatement -- is this really a PIM for
  95506 [hal9000 hype] If you perceive Windows support to be important, I can pay
  95609 [curt hibbs.c] [ANN] Tycho 0.0.0.7
  95642 [hal9000 hype] That's reasonable. It's not my plan to *exclude* Windows, certainly.

^ [rcr] rename append_features -> include_object
95507 [neoneye adsl] There is a saying: avoid asymmetry
95535 [matz ruby-la] But append_features does "append features" to the class/module.  The
+ 95536 [dblack wobbl] A module gets included in (or by) another module.
+ 95550 [neoneye adsl] true

^ semantics of continuations
95513 [me ibotty.ne] first of all, this is just a request for (participation|comment).

^ Complete Ruby API?
95514 [ks cs.auc.dk] Is there no other API for Ruby than the one on
+ 95515 [neoneye adsl] 'builtins' is just one chapter of the pickaxe book, there
| 95520 [ks cs.auc.dk] I lige me :)
| 95522 [ks cs.auc.dk] Why didn't I just try ... socket.addr did the trick :)
| 95569 [ks cs.auc.dk] .... it actually didn't do the trick :-/ The socket.addr returns the
| 95570 [sroberts cer] IPSocket#peeraddr(), perhaps?
+ 95516 [cyclists nc.] ...
  95519 [bob.news gmx] "Tim Hunter" <cyclists@nc.rr.com> schrieb im Newsbeitrag

^ What to gem?
95517 [feldt ce.cha] I'm trying to get-up-to-date with Ruby community happenings and jump on
+ 95521 [gsinclair so] I say put everything in.  Don't worry about duplication, because most
| 95532 [surrender_it] can I say that this is, imo, wrong?
| 95534 [neoneye adsl] It would be nice if there were a RubyReview team, which tried out newly
| 95537 [mailinglists] Everybody should be able to do this, we don't need  a team. And the
+ 95523 [neoneye adsl] The same as for tgz/zip, except there is no need
  95527 [feldt ce.cha] Thanks but I have something similar (also runs tests, cleans dirs,
  95528 [neoneye adsl] I am curious to see it.. is it online?   any url?
  95530 [feldt ce.cha] It's not cleaned up / generalized yet but specific to my dir structure
  95571 [neoneye adsl] Same thing here.. evolving over time, gets refined for every release I do.
  95752 [leon ugcs.ca] I do the same thing, except with a simple ruby script instead of rake. I'm
threads.html
top