104312-105311

104128-104514 subjects 104501-105267

Anonymous CVS service restart
104312 [shugo@ru y- ] = Anonymous CVS service restart
+ 104313 [vjoel@PA H. ] Will new snapshots start going out to the mirrors soon?
+ 104315 [dooby@d1 .k ] Congratulations, this must have been a horrible job.
| 104338 [shugo@ru y- ] Thank you:)
+ 104341 [pbrannan@at ] Thank you very much!
+ 104360 [surrender_it] wonderful, I was trying to access cvsweb.cgi just before this message

popen3 and spawn
104319 [hal9000@hy e] When I invoke telnet with PTY.spawn, I can easily send it the
+ 104337 [steven.jenki] I'd guess it's because the pipe is buffered. Try IO#flush or IO#sync.
| 104387 [hal9000@hy e] A reasonable guess, but it doesn't work for me.
+ 104421 [evanm@fr p. ] Forgive me if I don't explain this fully (I'm far from an expert), but the

Cocoa Controller Layer and RubyCocoa?
104328 [hvs1@ch ll .] did anyone succeed in using Cocoa Controller Layer/Cocoa Bindings

mod_ruby and Apache ForceType
104335 [ gm@na el gr] I am trying to use the ForceType directive of apache
+ 104359 [carl.youngbl] One other approach that I've used is to use mod_rewrite to cause some
+ 104401 [rasputnik@he] Can't answer directly , but isn't this the same as

Bug: Ruby 1.9.0 installs executable into wrong place
104339 [malteDELETET] At least I think this is a bug. Since I get a "404 not found" when

sub proces with '
104343 [roelandmoors] files = `ls -1 | sed 's/\..*$//' | sort -u`
104345 [decoux@mo lo] It's \ that you must escape
104348 [roelandmoors] damn, you're right, what was I thinking..

Warnings when using RedCloth and Rake
104344 [Stephan.Kaem] first of all thanks a lot for Rake and RedCloth, Jim and _why.
104349 [jim@we ri hh] It is set in the first line of the the main script invoked by the Rake
104377 [Stephan.Kaem] Wow.
104393 [sdate@ev re ] "Stephan K?mper" <Stephan.Kaemper@Schleswig-Holstein.de>

[BUG] Segfault - from Ye Olde Ruby/TK!
104347 [mhm26@dr xe ] 1) version
104354 [nagai@ai ky ] It's a known bug. This version has troubles about Ruby/Tk.

passing a block in an extension
104362 [cmills@fr es] I am trying to write a function in C which calls a Ruby function using
+ 104363 [quixoticsyco] return rb_yield(ary);
| + 104368 [cmills@fr es] Not exactly what I am after.  I was hoping to be able to use the block
| + 104370 [cmills@fr es] Not exactly what I am after.  I was hoping to be able to use the block
+ 104374 [sean@ce so t] Look at rb_scan_args in http://www.rubycentral.com/book/ext_ruby.html.
+ 104383 [nobu.nokada@] return rb_iterate(rb_each, ary, rb_yield, 0);

Newbie question - how to replace multiple whitespace within a string?
104364 [btully@gs oc] Sorry if this is too basic a question but I just inherited a handful of Ruby
+ 104365 [cribbsj@oa w] state.squeeze!(" ")
| 104369 [btully@gs oc] Simply MAH-velous! :)  thanks a bunch!
| 104371 [vjoel@PA H. ] str.squeeze! is destructive (changes the String object referred to by
| 104373 [btully@gs oc] Hmmm I'm a little hazy...
| + 104375 [cribbsj@oa w] You are correct.
| + 104376 [msparshatt@y] this is correct
| | 104379 [btully@gs oc] Aha!  Thanks Mark :)
| + 104497 [vjoel@PA H. ] @state = @user['state']
+ 104366 [usenet@an re] "New  York".gsub(/  /, ' ')

[ANN] CKHTMLTable 0.1
104367 [rb@ra hi ou ] this is my first announcement here. I hope I'm not too verbose, but I
104380 [jamesUNDERBA] No, not too verbose.  And, in general, I prefer when people write a

Data_Wrap_Struct
104372 [cmills@fr es] Can this macro raise an exception?
104384 [nobu.nokada@] * no memory even after GC

Webrick and Cookies
104385 [stedak@ch rt] Using a WEBrick::HTTPServer can some point me to an example
104400 [usenet@an re] cookie = Webrick::Cookie.new(name, value)
104407 [surrender_it] I wonder if it could be possibile to unify Webrick::Cookie and
104422 [dross@co e- ] There are plenty of people who know how to build secure code. It would be

thread id's
104390 [snowzone5@ho] how does one go about getting the thread id from within the thread
104392 [hal9000@hy e] Thread.current will tell the current thread id.
104394 [snowzone5@ho] and there it is right on page 390 of the pick axe book...right where i

yaml and initialize_copy
104402 [hal9000@hy e] I was reliving this post just now:  http://ruby-talk.org/96022

YAML.load and exception objects
104405 [don@na ri .o] I found a problem about YAML.load() and exception objects.

[OT] #! with WinXP's cmd.exe  (was: Re: Warnings when using RedCloth and Rake)
104409 [Stephan.Kaem] Well... I actually do. :-)
+ 104413 [sdate@ev re ] And so it is to me too :-0
| 104417 [Stephan.Kaem] Hmmm, I'm getting more and more puzzled by this...
| 104418 [drbrain@se m] You did.
+ 104414 [nobu.nokada@] Current ruby implementation takes options from the first line

embedded document meets end of file
104411 [neoneye@ad l] I am curious to what that message means?
104415 [nobu.nokada@] =end line must not be followed by non-space characters.  It is
104416 [neoneye@ad l] if it isn't part of the syntax.. wouldn't it then be better if Ruby rejected
+ 104420 [hal9000@hy e] I thought rdoc made use of this behavior?
| 104430 [dave@pr gp o] On the =begin
+ 104434 [nobu.nokada@] It is a part, but quite different from other parts.  And

ANN: KirbyBase 1.6
104419 [cribbsj@oa w] KirbyBase is a small, plain-text, dbms written in Python or Ruby.  It

Why doesn't this work? (CGI)
104423 [orion2480@ho] Using eruby/mod_ruby on an apache webserver.   In the following code, I
104425 [bg-rubytalk@] I don't know the internals of the CGI module well, but you're mixing a
104427 [orion2480@ho] <html><head></head><body>
+ 104428 [orion2480@ho] Forgot to mention that method="GET" doesn't change anything.  It appends the
| 104436 [sdmitry@lr .] See ruby-talk:96394 for the same problem and example of solution.
| 104439 [patrick@he a] I maintain an alternate CGI library, of debatable merit (in another
| 104441 [eyez@il uz o] I would argue that you should have some standard way of overwriting
+ 104438 [eyez@il uz o] Yes, you can absolutely mix and match POST and GET as long as your
+ 104458 [bg-rubytalk@] In that case, you're not mixing and matching.  You're only doing a "GET"

PTY.spawn error-prone?
104424 [hal9000@hy e] I've been playing with PTY and it seems to me that this
104426 [bg-rubytalk@] What kind of errors?  Exceptions, like the child exiting, and the fun
104429 [hal9000@hy e] The former, I suppose. Isn't it the case that the child may exit for
+ 104432 [john.carter@] Firstly, most people _won't_ notice this as a problem. If you working
| 104433 [hal9000@hy e] Thanks, John. Didn't mean to quote you out of context.
+ 105011 [billk@ct .c ] Funny thing... A day or two after reading this, and smiling

Ruby/Tk - Windows - disableforeground
104431 [mhm26@dr xe ] Is there any reason disableforeground and disablebackground don't work

Re: FXRuby question
104442 [lyle@kn lo y] Probably the fxruby-users mailing list is a better choice, although I

does anybody have a win32-binary of quixml?
104443 [t0rsten@pi e] i am searching a win32-binary of the quixml-libary (
104448 [eban@os ri .] % ruby extconf.rb --with-quixml-lib=c:/Expat-1.95.7/Libs --with-quixml-include=c:/Expat-1.95.7/Source/lib
104452 [t0rsten@pi e] checking for expat.h... no
104504 [djberg96@ho ] Torsten,
104522 [t0rsten@pi e] checking for main() in libexpat.lib... no

[ruby-gnome2] segfault with Gtk::ListStore.reorder
104444 [davinciSINSP] Now my problem is with function from subject. When I use it in my
104445 [joaopedrosa@] Are you on Windows? What GTK version? What Ruby
104446 [davinciSINSP] Ops. Sorry, sorry, sorry :)
104447 [joaopedrosa@] Good. At least you aren't on Windows. :-)
104450 [davinciSINSP] Of course ;)
+ 104453 [joaopedrosa@] I could reproduce it on Windows with both GTK 2.4.1
+ 104457 [mutoh@hi hw ] Thanks. Your example is really helpful.
  104483 [rcoder@gm il] FYI, on Fedora Core 1, using the system RPM for ruby-1.8.0 and
  104507 [joaopedrosa@] Thanks. Are you using GTK 2.4.x? Because I think this
  104508 [rcoder@gm il] Yes, I'm using a 2.4 version of Gtk. That could help to explain the difference.

Net::Telnet and TERM
104451 [nml@fj er .n] Anyone know how to set the TERM environmental variable on the remote box

N Dimensional Hash?
104454 [jim@fr ez .o] I'm looking for an object that behaves like a
+ 104463 [bob.news@gm ] "Jim Freeze" <jim@freeze.org> schrieb im Newsbeitrag
| 104464 [sdate@ev re ] I always thought that Arrays cannot be used as hash keys,
| + 104482 [alexmchale@g] What about something like this?
| + 104523 [bob.news@gm ] "Shashank Date" <sdate@everestkc.net> schrieb im Newsbeitrag
+ 104723 [john.carter@] An idiom I quite often use is...

rubygems thoughts
104455 [fugalh@xm ss] My participation here is sporadic at best, so forgive me if these
+ 104459 [jim@we ri hh] Thanks!
| + 104461 [lyle.johnson] Is there someplace that non-RubyForge projects can upload their gems,
| | + 104462 [curt@hi bs c] From an outsider's perspective (i.e., I'm not Rich or Tom), you could always
| | | 104481 [tom@in oe he] That would work too - and you wouldn't have to wait for anyone to put
| | + 104480 [tom@in oe he] Could be doable; perhaps a CGI script that accepted the files, verified
| + 104465 [hfugal@we co] Ok, that seems like a great solution. Guess not all the docs have been
| | 104466 [sean@ce so t] I didn't realize this either.  Someone ought to write a definitive tutorial on
| | 104468 [jim@we ri hh] "Beware of bugs in the above code; I have only proved it correct,
| | 104470 [jim@we ri hh] <nothing!>
| | + 104473 [sean@ce so t] Use YAML as the control file instead of native Ruby.  I think it would make
| | | 104485 [jim@we ri hh] Actually, the .gemspec file is optional, and I never build one for my
| | | + 104490 [sean@ce so t] That sounds like what I need.  Can I re-constitute the YAML into a native Ruby
| | | | + 104492 [gsinclair@so] I'm sure you can, but I reckon this sounds like the more difficult way
| | | | | 104493 [sean@ce so t] I agree, but I don't mind having to call a little code to load my own YAML and
| | | | + 104503 [jim@we ri hh] Yes.
| | | |   104506 [sean@ce so t] Sounds like it!  When you guys update the documentation, be sure to make a
| | | + 104491 [batsman.geo@] I think he's referring to a 2-stage install, like the one in FreeBSD's
| | + 104474 [sean@ce so t] Hey, at least you didn't accidently send a love letter for your wife to the
| | + 104475 [chadfowler@g] While vacationing in Europe, I'm working on what will hopefully be a
| |   104478 [sean@ce so t] It would be nice if Gems also used the directory structure used by setup.rb;
| + 104489 [gsinclair@so] $ ruby -r ruby-doom -e ''
+ 104460 [batsman.geo@] RubyGems no longer requires you to use that scheme; it can install
| 104467 [hfugal@we co] A good start would be working in signatures and letting people do with
| + 104469 [drbrain@se m] =20
| + 104479 [batsman.geo@] What I meant is that the more technical part of the problem is easily solved
|   104488 [hfugal@we co] Which is also what I meant. The hard part here is not the technical, but
|   104518 [rcoder@gm il] As a temporary fix, why not have the URLs at which gems can be
|   + 104524 [batsman.geo@] This sort of centralized system is the easiest solution (I'm soon
|   + 104538 [hfugal@we co] As Mauricio said, a centralized system like you propose requires the
|     104560 [rcoder@gm il] Why not just use the public-key system already build into SSH/SCP/SFTP
+ 104471 [quixoticsyco] [ piggybacking my request onto this thread :) ]
  104472 [lyle.johnson] Could you be more specific about the "without success" part? I somehow
  104486 [quixoticsyco] Well there were several problems and I was hoping to mooch off a

Win32 build fail: "syntax error : separator missing"
104456 [robertm@sp l] Checked out most recent version of ruby from cvs and tried to build it

IP address representation inconsistencies in Socket
104476 [dga@lc .m t.] I'm curious about the "standard" form for representing
104525 [decoux@mo lo] Dave Thomas has seen this problem and it's now corrected in the CVS

My Girlfriend Naked  7348
104477 [leepaterson@] Pictures of my girlfriend poseing naked

require "mylibrary" doesn't work in ASP
104484 [ssk@ch l. os] I'm trying to write ASP codes in ruby.

Writing WEBrick Servlets
104487 [drbrain@se m] I've written an article about how to write a WEBrick servlet and posted

Is it considered Harmful?
104494 [rohitlodha@h] obj.class = MyClass
+ 104495 [sean@ce so t] irb(main):002:0> {}.class = Array
| 104498 [drbrain@se m] Even if there was a #class=3D for objects, it ranks up there with goto in
| 104499 [rohitlodha@h] I knew it was evil, I think it should be norm.
| 104500 [sean@ce so t] Good question.  I am personally having trouble thinking of a good reason why a
| + 104502 [gfb@to es ft] It would be nice to have in real life too. Just imagine: you hold an
| | 105311 [onurb@xi ud ] *I* would ! Try to eat a piece of gold !-)
| + 104517 [rcoder@gm il] That's exactly the problem -- by forcing one object into another
| | 104536 [cm@le ts ea ] Heya,
| | 104544 [surrender_it] in evil.rb (you can find it at rubyforge) you even have Object#become
| | 104549 [jim@we ri hh] Are there limitations on evil.rb's implementation of become?  How do you
| | + 104558 [sean@ce so t] I don't know what crashing he's talking about, really.  I see no reason for
| | | 104564 [decoux@mo lo] Well, apparently you don't want to look in ruby-talk, nor read the ruby
| | | 104570 [sean@ce so t] I know what Ruby does, I just ran my own test.
| | + 104565 [rcoder@gm il] The default implementation simply does a check to insure that you're
| | + 104572 [batsman.geo@] evil.rb's Object#become is restricted in several ways, to try to prevent
| + 104526 [decoux@mo lo] If you think that the possiblity to crash ruby is not a technical reason,
|   104539 [sean@ce so t] You're wrong on that.  It wouldn't crash Ruby to change the class of an
|   + 104542 [dave@pr gp o] Singletons are effectively subclasses of the original.
|   | + 104552 [sean@ce so t] class Regexp
|   | | 104557 [dave@pr gp o] Modules (such as Enumerable) only add methods. Classes also have state.
|   | | + 104561 [decoux@mo lo] This is worst than this : Enumerable rely on the method #each which is
|   | | | 104569 [sean@ce so t] I have to admit when I'm wrong.
|   | | + 104562 [sean@ce so t] a.read would do what #read does when it can't read because there's no open
|   | |   104566 [dave@pr gp o] How does it know there's no open file? Go have a look at the code.
|   | |   104573 [sean@ce so t] #define GetOpenFile(obj,fp) rb_io_check_closed((fp) =
|   | + 104559 [ptkwt@ar cn ] I have to admit that I too had to do a double-take when I saw someone
|   | + 104587 [sean@ce so t] a = /cat/
|   |   104636 [decoux@mo lo] Try first to test your patch.
|   |   104646 [sean@ce so t] I did; it works fine.
|   |   104663 [decoux@mo lo] * there is a french word for what you are doing : apprenti-sorcier
|   |   104694 [sean@ce so t] I did it, and it worked like I said it could.  I didn't say Matz would accept
|   |   + 104695 [stopsod@ya o] The question is, "Are you annoyed that matz didnt want
|   |   | 104697 [msparshatt@y] Do you know one of the many things I like about Ruby?
|   |   + 104698 [stopsod@ya o] Sean, this is what we think apprenti-sorcier means on
|   |   + 104699 [patrick@he a] I think that #become and #class= are _theoretically_ wrong.  Such a
|   |   | + 104700 [sean@ce so t] This is a good question.  In the past, I've wished I could change objects into
|   |   | | + 104701 [patrick@he a] Delegation sounds like the solution here, either hand coded or with
|   |   | | | 104706 [sean@ce so t] Well, I think the rule here is: buyer beware.  The only real use for class=
|   |   | | | + 104707 [patrick@he a] a = SomeClass.new
|   |   | | | + 104710 [patrick@he a] Sean,
|   |   | | |   104712 [sean@ce so t] Well, in C extensions you have typing, period; you can't get around that.  In
|   |   | | |   104714 [patrick@he a] Classes defined in safe old 'script.rb' files will have to deal with
|   |   | | |   104715 [sean@ce so t] Those variables will still exist; all that changes is the class that handles
|   |   | | |   104716 [patrick@he a] If an object of SomeClass becomes a Tempfile (or any other class with
|   |   | | |   104724 [sean@ce so t] The class that created the object should have already initialized it.
|   |   | | |   104754 [patrick@he a] Sean,
|   |   | | |   104763 [sean@ce so t] I think you're not understanding what class= does.
|   |   | | |   + 104764 [phubuh@ph bu] I think what Patrick means is that all methods assume that their class's
|   |   | | |   | + 104766 [sean@ce so t] #class= can only be called on existing objects, so it can't prevent
|   |   | | |   | | 104767 [halostatue@g] foo = Object.new
|   |   | | |   | | + 104769 [sean@ce so t] Safely, yes.  Usefully, no.  Tempfile can't do much with just an Object
|   |   | | |   | | | + 104772 [phubuh@ph bu] evil.rb implements #become without traversing the entire set of live
|   |   | | |   | | | | 104773 [sean@ce so t] You can't do that with #class= either.  You can only call #class= on objects
|   |   | | |   | | | | + 104775 [hal9000@hy e] You're missing his point.
|   |   | | |   | | | | | 104782 [sean@ce so t] Ah...I see why I haven't connected with that issue now.  I think of this as a
|   |   | | |   | | | | | + 104815 [gsinclair@so] No it wouldn't.  Objects are supposed to represent data and behaviour.
|   |   | | |   | | | | | | 104817 [sean@ce so t] I realized my error regarding #become after reading another post.
|   |   | | |   | | | | | + 104820 [patrick@he a] Sean,
|   |   | | |   | | | | |   104822 [sean@ce so t] There are two problems with #class= that I was talking about, not just one.
|   |   | | |   | | | | + 104776 [phubuh@ph bu] By "whose #initialize", I meant "whose current class's #initialize".
|   |   | | |   | | | + 104777 [halostatue@g] No, it wouldn't work safely, and your protestations to the contrary
|   |   | | |   | | | | 104784 [sean@ce so t] Okay, I think I understand #become now.  The object is COMPLETELY replaced by
|   |   | | |   | | | + 104814 [gsinclair@so] module SocketLogger
|   |   | | |   | | + 104771 [sean@ce so t] Do me a favor.  I don't insert personal attacks here towards you during these
|   |   | | |   | + 104780 [flgr@cc n. e] There's already Object#allocate which creates an Object without
|   |   | | |   + 104779 [rohitlodha@h] I think Class and Modules in Ruby differ here. Modules are just set of
|   |   | | + 104719 [halostatue@g] I think that Matz is going to provide a much better facility for this
|   |   | | | 104720 [gsinclair@so] That sounds about right to me.  Aren't there two separate issues here?
|   |   | | | + 104722 [patrick@he a] Gavin,
|   |   | | | + 104725 [sean@ce so t] That's funny, because the first one makes immediate sense to me, but I'm not
|   |   | | | | 104729 [gsinclair@so] No, the object x points to is discarded and x points to y instead.
|   |   | | | | + 104734 [surrender_it] I think that #become is useful in ST even for changing a fixed size
|   |   | | | | + 104761 [sean@ce so t] In that case, #become sounds like a better way to get pretty much the same
|   |   | | | + 104781 [flgr@cc n. e] Does it have any use in real world code? I don't know. If anybody has an
|   |   | | + 104732 [horacio.lope] This particular example you propose with files can be done with
|   |   | |   + 104735 [surrender_it] Withouth the need to use AspectR, there is a wonderful trick from
|   |   | |   | 104736 [horacio.lope] Well, the "cleaner" part of that, is AOP as well
|   |   | |   + 104760 [sean@ce so t] You can actually do it similarly by simply replacing methods you want to
|   |   | + 104711 [batsman.geo@] The Object#become in evil.rb does what you call #replace_self (AFAIK
|   |   |   104718 [patrick@he a] Mauricio,
|   |   + 104731 [decoux@mo lo] no comment
|   + 104543 [decoux@mo lo] Just search in http://www.ruby-talk.org/
|   | 104553 [sean@ce so t] No I haven't.  That has no bearing on whether or not you can change an
|   + 104546 [billk@ct .c ] Supposed an object's class were changed to a different class
|   | + 104547 [decoux@mo lo] It's always ruby fault when it crash with a .rb file
|   | | 104550 [rcoder@gm il] It's usually Ruby's fault, except for the fact that you can, in "pure
|   | | 104554 [decoux@mo lo] If you use a module like DL, it's not for me "pure ruby" code.
|   | | 104568 [rcoder@gm il] My point was that DL was already a part of the Ruby standard library,
|   | + 104548 [drbrain@se m] Smalltalk's classes are better factored to handle such occurances.
|   | | 104551 [jim@we ri hh] I found the following paragraph about Squeak Smalltalk interesting.  Most
|   | + 104556 [sean@ce so t] No code should "expect" data to be there that isn't.  If a C extension wraps a
|   |   + 104571 [rcoder@gm il] I agree with you about it being sloppy programming, but then again,
|   |   | 104574 [sean@ce so t] I was actually speaking of Ruby C code, not so much Ruby script code.  Ruby
|   |   | 104577 [rcoder@gm il] The point of this whole thread, though, is that adding #become and
|   |   | 104578 [sean@ce so t] No, changing an object's class wouldn't cause Ruby code to be as prone to
|   |   + 104600 [billk@ct .c ] No ambulator should "expect" the rug to remain steady
|   |     104604 [sean@ce so t] You can if it's nailed down.  You don't if it's a throw run with a rope tied
|   + 104567 [batsman.geo@] Yes it will, in the current implementation.
+ 104496 [quixoticsyco] I don't know -- is NoMethodError considered harmful? :)
+ 104533 [srubin@fs sy] I can't possibly imagine it being useful to do this except when the
  104535 [jim@we ri hh] The "standard" application for the self.class= method (aka become(class))
  + 104537 [ahoward@no a] sounds like an RCR for Object#tie
  | 104541 [sean@ce so t] Or class=.
  + 104540 [sean@ce so t] I don't think it would be difficult at all.  In fact, think of what Ruby has
  | 104545 [decoux@mo lo] You are right, a C extension can effectively crash ruby
  | 104555 [sean@ce so t] You can do all sorts of things with Ruby, I see no reason why changing an
  | 104590 [cc1@ce .w st] All of those places that you can assume the underlying datatype hasn't
  | + 104591 [sean@ce so t] Actually, the comparison is a function call that mostly just checks a bit
  | + 104594 [sean@ce so t] Ran some tests.  Ran this Ruby code, which causes the check to occur 100,000
  |   104634 [jean_hugues_] There is a theory that says that the speed of a language
  + 104582 [flgr@cc n. e] There are operations which can't be forwarded. I can only think of the
    104586 [jim@we ri hh] Comparisons are problematic because the first line of a comparison is
    104593 [flgr@cc n. e] It depends -- the answer to that question can be overloaded in most
    104595 [phubuh@ph bu] How about changing the object to a redirection pointer, and also
    104635 [jean_hugues_] OTOH you don't want to make a slow thing even slower and it
threads.html
top