15064-15983 subjects 15471-15895

^ Bug or feature? eval("x=5")
15235 [hal9000 hype] This piece of code works as I expect.
15237 [joe vpop.net] irb(main):001:0> eval("x=5")
+ 15240 [decoux moulo] The reference to x as a local variable or a method call is resolved at
+ 15241 [keiju ishits] This is a difference of execution semantics of Ruby and irb.
+ 15244 [jskeeler pac] See p.528 of the pickaxe book (in appendix B).
  15269 [elderburn mi] Reply to: elderburn@mindspring.com

^ help writing MetaRuby Contracts
15239 [matju sympat] Here's another call for help.

^ help: how to write unit tests for Ruby-X11
15243 [matju sympat] How would you write unit tests for Ruby-X11 ?
15245 [Dave Pragmat] Would the XTest extension help? Or you you want to isolate your tests

^ c-api-question.
15259 [erik bagfors] Here is a ruby-api newbies question.
15260 [matz zetabit] It depends on what and how you want to show to Ruby world.

^ NewbieQ: gsub replacing '\n'
15264 [angus pobox.] I'm playing around with Ruby, and I've come across something I can't
+ 15267 [decoux moulo] No, perl do the same than ruby
+ 15278 [elderburn mi] What platform? What version of Ruby?

^ WriteExcel for Ruby
15268 [hdstich comm] btw, i'm trying to port John McNamara
+ 15276 [julian.romer] I am interested in the ReadExcel one (read from the binary format).
| 15280 [hdstich comm] hmm, i found Spreadsheet::ParseExcel searching the CPAN...
+ 15298 [iso247 free.] Sure :^)

^ [ANN] NQXML v0.6.2
15270 [jimm eris.io] NQXML is a pure Ruby implementation of a non-validating XML processor. It

^ ftools: File.catname bug?
15271 [mike lepton.] irb(main):002:0> File.catname "hello", "/usr"

^ Delphi and Ruby?
15282 [szegedy or.u] Has somone ever tried to link Ruby into a delphi project?
15288 [mzh portnet.] Kazuhiro Yoshida has.
15304 [moriq.kazuhi] Apollo lastest version is ap-624b.

^ Ruby in Java
15290 [glen enabled] Is anyone working on a Ruby implementation in Java (like Python's
+ 15294 [ser germane-] Yes, this interests me.  Are you thinking of doing a BSF interface for it?
| 15297 [glen enabled] I am thinking of something much along the lines of Jython, but perhaps
| 15300 [ser germane-] I'm not familiar with Jython, but providing a BSF compatible interpreter
| 15301 [glen enabled] Jython allows you to write code that looks exactly like Python. For
+ 15295 [glen enabled] Okay... I should probably go through the archives before I post
+ 15386 [matju sympat] My current design for such a beast is based on the assumption that not
| 15394 [decoux moulo] Well, it exist a reference implementation for ruby, see parse.y
| + 15405 [glen enabled] While I have lex and yacc on my resume it is mostly in the hopes that
| | 15424 [ser germane-] I haven't touched yacc or lex since college, either, but there is JavaCC
| | 15425 [ser germane-] Doh.  I spoke before I thought about the terms I was using, and I remembered
| + 15413 [matju sympat] I did say "a" reference implementation, and you did say so too. The C/YACC
| + 15414 [decoux moulo] What is this ?
+ 15431 [wayne.blair ] I've written a commercial java compiler/parser for an embedded scripting

^ URI package
15291 [wayne.blair ] Why does it say uri.rb is obsolete in the RAA?  Is there a built in
15422 [nahi keynaut] I don't know, and No.

^ Small regexp Perl -> Ruby translation
15292 [mattbee soup] Couldn't find the answers in the online book or the reference manual-- how
+ 15296 [decoux moulo] See String#scan
+ 15303 [Dave Pragmat] Have a look at String#scan

^ Q: Should initializers validate arguments ?
15299 [robert kedoi] I'm new to Ruby and I came across something today and I was wondering if

^ Re: [OT-ish] language (was: Re: Discussion on new Ruby features)
15306 [dblack candl] You would sound *very* strange in German if you messed with the word
15314 [wayne.blair ] =====
+ 15315 [ben_tilly op] =====
+ 15323 [matz zetabit] Not really.  Let me give you small lesson.  Japanese has small

^ wait method?
15307 [wayne.blair ] Is there a wait or sleep method built into ruby?  The following is an
+ 15309 [dgjs acm.org] How about something like
+ 15327 [mike lepton.] There is a built in sleep method.
  15330 [wayne.blair ] Doh!  Thanks, dude.

^ private nested classes: how?
15311 [szegedy or.u] I am playing around with nested classes.
15322 [matz zetabit] public/private/protected stuff work with method only.

^ Off topic, languages
15313 [benoit.cerri] Not exactly, the part of the sentance that describes its syntaxic function

15318 [mdinowit i-2] subscribe michael dinowitz

^ US$5000
15321 [carolyn_j au] ????????????????? :=

^ Q: Compiling Ruby 1.6.3 in Win32 (VC++)
15324 [Milan.Gardia] I am unable to compile Ruby 1.6.3 successfully with VC++.
15348 [moriq.kazuhi] -CFLAGS = -nologo -DNT=1 -Zi -MD -O2b2x -G5

^ help with rubyunit
15325 [max malva.co] As you can see from the snapshot below, I run NotterTest.suite
+ 15328 [wayne.blair ] RUnit counts tests, not assertions.  The framework creates a test for each
| 15341 [chris atdesk] I've been using RUnit for a few weeks now and it has always counted
| 15342 [wayne.blair ] Yeah, you're right.  Sometimes my fingers move faster than my brain.  Now
+ 15347 [wayne.blair ] Here is the solution to the problem, finally.
  15356 [max malva.co] Thanks, Wayne.
  + 15358 [wayne.blair ] I didn't see the hook built in, and I was trying to find a painless fix.
  + 15797 [masaki.suket] Try the latest version RubyUnit
    15829 [max malva.co] I will probably wait for stable 0.4 version

^ [ANN] NQXML v0.6.3 (bugfix: multi-line comments)
15326 [jimm eris.io] Version 0.6.3 fixes a nasty bug: multi-line comments would blow up inside

^ Array to Hash?
15331 [jim freeze.o] Is there a built in way to turn an array
+ 15337 [wscott bitmo] This was a big topic a while back.
+ 15343 [matju sympat] h = Hash[1,2,3,4]

^ Newbie Module Mixin Issue
15332 [SAT MULTITEC] I want to write a module that when mixed into another class finds out when a
15345 [matju sympat] Just a tip: don't mess with "new" unless you really know what you're
15376 [SAT MULTITEC] Thanks for the tip. That worked however, each class that has this mixed in,
15409 [matju sympat] No, because there would have to be a way to say that you don't want super
15415 [decoux moulo] Well, if one day ruby has dispatch on the type, it probably will need to

^ how to use garbage collection relyably?
15333 [viisi chello] how is garbage collection intended to be used?
+ 15360 [decoux moulo] Yes,
+ 15362 [matz zetabit] Yes.  Ruby uses conservative garbage collection technology.
  15371 [viisi chello] ah nifty, i see now!

^ How do I copy an object?
15334 [jim freeze.o] I want to copy an object that contains an array.
15417 [kentda stud.] Note that your code does _not_ dup nor clone the @s array, which
+ 15442 [hal9000 hype] Generally true. But there's the trick of using Marshal to dump an object
+ 15469 [decoux moulo] This is more complex than this. Think, for example, about RCO

^ Re: How to clone an object?
15335 [jim freeze.o] Sorry for responding to my own post, but the
15338 [Dave Pragmat] class K
15339 [jim freeze.o] Thanks, that works well. But, what if a is private.
+ 15340 [Dave Pragmat] You could cheat and use instance_eval, or do something like
+ 15410 [jj5412 earth] class A

^ Problem with gtk
15336 [Stephan.Kaem] I recently installed Ruby 1.6.3 using the Pragmatic Programmer's Ruby
15363 [Milan.Gardia] I solved the problem by downloading new dlls from the following page ("GTk+

^ Syntax highlighting
15344 [jtobler Wire] This message is in MIME format. Since your mail reader does not understand
15346 [jtobler Wire] I have created a simple syntax highlighting file that works for the CREdit

^ newbie question
15349 [r.kochhar01 ] I have the following ruby test case that works in the window environment but
+ 15350 [gnhurst hurs] `-- typo
+ 15351 [avi beta4.co] initialize
+ 15352 [jweirich one] You misspelled initialize.
+ 15354 [wayne.blair ] You have a typo in "initialize".

^ newbie question: debugging
15353 [r.kochhar01 ] Thanks to all of you about my earlier question..  I had retyped on the linux
15355 [wayne.blair ] I believe you have to start each and every line with a #.
15357 [avi beta4.co] =begin
+ 15359 [decoux moulo] debug.rb can debug only ruby code. If you want to debug C code, you must
| + 15389 [r.kochhar01 ] Thanks for the help.  But I am having trouble using gdb.  Here is the
| + 15393 [decoux moulo] Well,
+ 15368 [wayne.blair ] I'm turning into the king of errant posts.

^ Time.times problems in libc5; getrusage request
15361 [gnhurst hurs] irb(main):004:0> t=Time.times
15364 [decoux moulo] Can you write a small C program which emulate time_s_times (i.e. just a
15379 [gnhurst hurs] Ok, I tried at least three approaches...
15381 [Dave Pragmat] According to times(2), the return value, which should be of type
15382 [gnhurst hurs] I asked my sysadmin about this..

^ How to distribute Ruby source?
15365 [jim freeze.o] I have some Ruby code that I need to distribute.

^ UnMac
15366 [ugly-daemon ] $ run
15367 [chadfowler y] There is an old version of this that exists called
15373 [ugly-daemon ] Ok I have got a bash version and a c version which apparently hasn't been
+ 15377 [neumann s-di] You may have a look at Eliza.
+ 15397 [mike lepton.] Do you know Esperanto? I think it would be a nice interface language between computers and humans. I don't know it well, I only read a few documents about it. But its syntax seems very easy to interpret (no exception, simple rules, simple grammar...), and can be used as a natural speaking language. Human *and* computer friendly.
  + 15398 [ser germane-] I've been thinking about this for a long while now.  In fact, I have a
  | 15421 [ugly-daemon ] Yes I am interested in pursuing this. I will be doing my research. Any recommendations for books/sites, etc??
  + 15420 [ugly-daemon ] Very cool. Thanks to Micheal for the pointer to eliza. I have been sidetracked by a chat bot called alice which has eliza as its ancestor. So now I will be moving from a adventure shell type of thing to an agent like alice. I think I have some ideas on how to make her much smarter.

^ Compiling ruby-mysql on Windows
15369 [CRIBBSJ oakw] I apologize if this question has been answered before (although a quick

^ snmp
15370 [Paul.Thompso] This message is in MIME format. Since your mail reader does not understand
15372 [decoux moulo] Is it supposed to be produced when you install ucd-snmp library.

^ enumerate hash items within an extension ?
15374 [sol123 msn.c] How can I enumerate the items in a hash passed to an extension (.c) from =
15396 [decoux moulo] Well, you can use rb_iterate() (see README.EXT)

^ SpecTcl GUI-builder version 1.2a2 (SpecRuby FYI)
15375 [schneik aust] FYI, for those interested in eventually updating SpecRuby.

^ ruby bugs
15378 [matju sympat] Bug report.
+ 15380 [wscott bitmo] printf specifies that the 'x' format is unsigned and Ruby has
+ 15399 [JCA02266 nif] p sprintf("% x", 42)   # => " 2a"
+ 15418 [jaco teaser.] In fact, %x is a format for _unsigned hex_, as in ISO C89 and further,

^ Re: Bug in time.c (was Time.times problems)
15383 [Dave Pragmat] Like the time(2) call, it can't fail.
15384 [matz zetabit] appropriately.
15387 [Dave Pragmat] That's strange. On both my boxes, the man page doesn't mention an
15388 [matz zetabit] I'm confusing why starange behavior had happened for Guy's program.

^ tklib
15390 [mkoh cs.indi] I am trying to run the tk example in the Ruby book under Solaris 2.6 and
15423 [jaco teaser.] runs fine here (ruby 1.6.4 (2001-05-17) [i386-freebsd4.3])
15428 [mkoh steel.u] Yes.

^ PROPOSAL: Java-like method-based synchronization mechanism in Rub y
15391 [WYS helbling] require ynchronizedĽ¨
+ 15395 [Dave Pragmat] Is this thread safe, or could two different threads each generate
| 15400 [WYS helbling] You are right, we need to apply the "Double-Checked Locking" as described in
+ 15407 [m_seki mva.b] (--> http://www.ruby-lang.org/en/raa-list.rhtml?name=MutexM)
+ 15436 [patrickdloga] Ruby borrows several good things from Smalltalk, Scheme, Perl, etc.

^ xmp
15392 [wayne.blair ] Hey,
15463 [wayne.blair ] Fix this problem by changing line 180 in xmp.rb from

^ Ruby/X11 version 0.2
15402 [matju sympat] Announcing Ruby/X11 version 0.2. It's been a lot of work. I release it

^ how to remove method from singleton class
15403 [vjoel path.b] How can I remove a method from a singleton class?
+ 15406 [vjoel path.b] eval <<-END
+ 15408 [matz zetabit] class <<obj
  15433 [jskeeler pac] That's inconvenient, because instead of :foo there is a variable which
  15462 [matz zetabit] class <<obj

^ printable doku or tutorial
15404 [daniel dseic] I search a good tutorial/doku for ruby, which is printable respective

^ gnutella client
15411 [todd designs] Does anyone know where I can get pseudocode to write a client for the

^ [ANN] SOAP4R/1.3.0
15416 [nahi keynaut] SOAP4R is a Ruby library program to handle Simple Object Access

^ native compiler ?
15419 [fabrice cele] Sorry if this question has been answered several times, but
15426 [ser germane-] Yes, there is an application called rb2c

15427 [ccjegcod pri] I do not understand why the United States

^ Someone sending viruses
15429 [wayne.blair ] Someone responded to my original post (subject: xmp) by directly sending me

^ Someone sending viruses
15430 [wayne.blair ] Someone responded to my original post (subject: xmp) by directly sending me

^ IIS application mapping
15432 [ndrochak gol] I have put an appication mapping for .rb files in my IIS.  I used
15437 [jimm eris.io] In the Unix world, GET uses environment variables and POST uses standard
15480 [r2d2 mao.acc] It is the same (but I think IIS also supports some other forms of CGI parameter
15516 [nick jobdrag] I did finally stumble upon the cgi module, although that has just opened
15537 [r2d2 mao.acc] No. I prefer to just use plain CGI, and not IIS specific things, to ensure that

^ A proto-RCR: making def and class rvalues
15434 [Dave Pragmat] 1. It's hard to use these values, as the syntax doesn't allow a method
+ 15439 [Dave Pragmat] (Sorry to follow up my own post, but...)
| 15445 [hal9000 hype] Dave,
+ 15440 [avi beta4.co] I would suggest
| 15441 [Dave Pragmat] Yes - that's a great idea.
+ 15444 [matz zetabit] I think changes 1, 2 and 4 are OK.  But I don't really agree with
  15450 [Dave Pragmat] True, although you _could_ tell at parse time and generate a different
  15452 [matz zetabit] Well, it's possible because "def" is a syntax.

^ Newbye question: retrieving a Class by its classname
15438 [benoit.cerri] def XmlElem.getClass4Name(name)
+ 15453 [ptkwt shell1] I don't like over using eval either...
+ 15458 [benoit.cerri] of course I meant return eval("#{name}"), this is just a typo, my question
  15482 [   xm w3d.ru] module TestModule
  15529 [benoit.cerri] Thank you,

^ Idea for C extension?
15447 [hal9000 hype] I'm about to write a Ruby extension in C as an exercise.
15521 [rise knavery] The Bind resolver library is pretty standard and quite useful for doing

^ RCR: #const_name_is
15448 [matju sympat] current_module.const_set(:Foo,bar)
15451 [Dave Pragmat] Could you provide a couple of examples of where this would be useful?
15454 [matju sympat] x = Class.new   #==>   #<Class 0lx4020d7f4>
+ 15455 [matz zetabit] Well, in this case, Module#to_s (or more precisely find_class_path()
+ 15457 [Dave Pragmat] I'm still struggling to understand how this would be useful. You have

^ Embedding Ruby - Segfaults?
15449 [elanthis use] Greetings!
15470 [decoux moulo] This is not a ruby problem, but a problem in your application.
+ 15473 [elanthis use] OK.  That makes me feel better.  ^,^
+ 15475 [decoux moulo] Something like this (not tested)
  + 15503 [elanthis use] Ok, I'm at work, so I can't really mess with Ruby at the moment (but hey, if Ruby works out well in my other project, I'll be using it in my current one here at work, as well), but I could swear that funcall will return Qnil (from my source-reading).
  + 15538 [decoux moulo] Try it :-)
    15539 [elanthis use] Ya, it worked.  I feel dumb now.  Thanks!

^ more reflection
15456 [matju sympat] shouldn't there be a version of Module#included_modules or #ancestors
15461 [matz zetabit] There's no such thing like repeated inheritance (or inclusion) in
15464 [matju sympat] 1. Explain why that program works.
15465 [matz zetabit] $n = ARGV[0].to_i
15466 [matju sympat] You are perfectly right. I forgot about the .dup and the rest was just a
15467 [matz zetabit] Yes.  This might be a misfeature.  Methods in Bar can be considered as
15625 [matju sympat] foo.singleton_methods
15706 [matz zetabit] Interesting.  I'll merge this behavior to 1.7

^ Re: #const_name_is
15459 [benoit.cerri] Just a suggestion, if you don't have a sample of an app embedding ruby or if

^ fastcgi module
15468 [steven harya] Sorry if this has been discussed (indeed it has, after my
15705 [matz zetabit] See [ruby-talk:6790] via http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml