3016-3460 subjects 3410-4100

Example of subclassing user-defined Ruby class in C?
3190 [feldt@ce ch ] I'm trying to understand how to extend Ruby's functionality. The API seems
3193 [decoux@mo lo] pigeon% cat sup.c

Access to DB2
3195 [dominique.cr] I would like to know how to access DB2 database?

Ruby Tutorial? URLS please.
3197 [embed@NO PA ] I was wondering if there were any tutorials anywhere. Don't see them on the
3200 [decoux@mo lo] Guy Decoux

NT build problem, VC 6, ruby 1.4.4
3198 [embed@NO PA ] I ran the batch file in ruby1.4.4\win32 that copied a preconfigured config.h
3204 [erngui@ac .o] I've tried the same with both VC++ 5.0 and 6.0 and the problems I saw came

Nan and Infinity
3202 [Dave@th ma e] If the result of a floating point operation is Nan or one of the
+ 3203 [gotoken@ma h] I had written floatinternal.rb to hack floating numbers.
+ 3244 [matz@ne la .] I guess so.  I will add them to the Float class.

How to copiling Ruby as a Apache module?
3205 [jilanik@ti .] 1) as subject;
3206 [Dave@th ma e] It depends on your platform, and whether you built the original Ruby

NT build problem, Cygwin 1.1.2, Ruby 1.4.4
3207 [feldt@ce ch ] I'm also having problem building Ruby on NT but I'm using Cygwin/gcc. The
+ 3208 [mak@mi ro la] ...
+ 3211 [Hirofumi.Wat] I've already fixed it. Check the latest CVS(ruby_1_4 branch).

CGI in Ruby -- Not yet solved!
3209 [jilanik@ti .] could somebody who is using Apache and Ruby for CGI application send me
3212 [Dave@th ma e] AddType application/x-httpd-eruby .rhtml
3215 [matz@ne la .] I use .mrb as cgi suffix. With above configuration, mod_ruby tried to

Embedding Ruby
3210 [geoff@in os ] I'm new to Ruby and can't seem to find much info calling Ruby from C.
3213 [c.hintze@gm ] Hmmm, have you already got a Ruby distribution? If yes, there is a

FYI: Interview with Larry Rosler (who helped standardize ANSI C)  about Perl.
3214 [schneiker@ju] This is another in a series of occasional items about what our Perl and

RCGI in Ruby -- Not yet solved!
3216 [jilanik@ti .] Dave,

Ruby & Interbase -- Please answer if you know!
3220 [jilanik@ti .] // this message has been posted but it was as -- blowing in the wind
3221 [decoux@mo lo] Well, I know nothing about interbase, but look at the file README. You

Ruby coding standard?
3222 [feldt@ce ch ] Anyone knows of a Ruby coding standard or at least some recommendations on
+ 3224 [jilanik@ti .] I think Pascal coding reamains the more readable.
| 3226 [Dave@th ma e] Which one?
+ 3225 [Dave@th ma e] Have a look at some of the library code. If you feel it's readable,
| + 3228 [feldt@ce ch ] Thanks for your tips; for syntax-related stuff emacs and the style used in
| | 3229 [Dave@th ma e] I find it sometimes hard to break Java habits here, but I'd guess the
| + 3232 [jilanik@ti .] Yes. I agree.
+ 3237 [matju@CA .O ] I'm going to say something not many people say.
  3258 [dcalvelo@ph ] I mostly agree with those three ways of reading code. I have some
  3677 [matju@CA .O ] It's not 3 ways of reading code, it's 3 things a programmer can write
  + 3680 [neumann@s- i] left
  + 3682 [dcalvelo@ph ] Of course. Fast fingers and slow brains: me.
    + 3683 [neumann@s- i] class Object
    + 3684 [schneik@au t] No need to be. We should take good ideas wherever we find them. I think it is
    + 3746 [matju@CA .O ] Well, I'd like to keep the WHY part separate from the WHAT; this means
      3765 [dcalvelo@ph ] [me]

Ruby & Interbase -- an other step!
3223 [jilanik@ti .] Guy,
+ 3227 [decoux@mo lo] cursor.each do |record|
+ 3230 [matz@ne la .] The record given by each (or fetchone/fetchall) is an array.  You

Thank you for you help!
3231 [jilanik@ti .] It is just what I want. Thank you.

Making a class method private
3233 [DDouthitt@cu] ...
+ 3235 [wscott@ic ip] [[ code that attempted to make a private method ]]
+ 3239 [Dave@th ma e] (Sorry, but I always wanted to do that)
+ 3243 [matz@ne la .] `private' takes symbol (identifier object, represented by Fixnum in

Questions re: "new" "+=" etc.
3234 [hal9000@hy e] Posting to the ng since I've temporarily lost
+ 3238 [kjana@os xa ] First of all, class methods of class Foo in ruby is methods defined on
| 3306 [hal9000@hy e] Foo.
+ 3242 [matz@ne la .] You have to know that instance methods and class methods are totally
+ 3254 [matju@CA .O ] += is syntactically an operator, but it is not a method. a method does

Ruby and large web applications
3245 [jilanik@ti .] for many years, almost 20,  I have been programming standalone and C/S
+ 3250 [matz@ne la .] I'm not sure there's any large scaled web application already or not,
| 3251 [jilanik@ti .] matz,
+ 3257 [Dave@th ma e] I'd echo Matz's list, and the add something.

3256 [ilnodo.it@il] www.ilnodo.it

Exception Handling
3259 [phasis@ch nn] In the following code,
+ 3264 [jesse@cs un ] "retry" which should be handled with care.
+ 3266 [matz@ne la .] for f in ['a','b','c']

mod_ruby error?
3260 [phasis@ch nn] When I test file upload with mod_ruby,
3267 [matz@ne la .] Probably it's mod_ruby's bug.  Could you give us
3273 [phasis@ma l.] Red Hat Linux release 6.0 (Hedwig)

Interbase/Ruby in progress, but..
3261 [jilanik@ti .] why calling this script form a borwser (http://myserver/cgi-bin/test.rb)
3263 [Dave@th ma e] Your browser probably runs as a different user ID (often

Ruby and large web applications
3262 [jilanik@ti .] Certainly. I am a technical contributor at Linux&C magazine

Interbase/Ruby in progress. Error Found!
3268 [jilanik@ti .] conn = InterBase::connect('localhost:/ibase/arianna.gdb', 'sysdba',

Interbase/Ruby in progress. Error Found!
3269 [jilanik@ti .] Error found!

Embedding Ruby
3270 [geoff@nm 56 ] I've been able to call Ruby functions from C but am getting a core dump when
3276 [decoux@mo lo] ruby is multi threaded, this mean that you don't need to use pthread.
3278 [c.hintze@gm ] I believe that you even MUST NOT use pthread in ruby, indeed! Although
3297 [geoff@in os ] I used pthreads here to demonstrate the problem, not to create a

Ideas for ext installer extension
3279 [feldt@ce ch ] I've got some ideas for extended func (or maybe there is something out
+ 3280 [decoux@mo lo] It can exist a security risk with this part, if it don't exist an
+ 3282 [Dave@th ma e] This is concerned with backwards compatibility. Personally, I'd prefer
  3285 [aleksi.nieme] Being able to specify needed at least Foo 1.6 is nice for forward

about documentation
3292 [wscott@ic ip] I want to contribute to the ruby project in my spare time.
+ 3293 [Dave@th ma e] Have a look at rdtool in the application archive.
| 3296 [aleksi.nieme] Me too x 2.
| + 3298 [DDouthitt@cu] Is anyone creating Ruby manuals and documentation in SGML format? In doing so, then the Ruby documentation (from the same source!) could be generated in HTML format, PostScript format, and many others.
| + 3300 [Dave@th ma e] I have to admit that I think that rd documentation can be
| | 3304 [toshirok@yb ] articles of magazines in RD. On the other hand, some think RD is not
| | + 3305 [hgs@dm .a .u] May I suggest that this be extended to "\n=begin <doctype>"..."\n=end"
| | | 3308 [Dave@th ma e] Already does it: Ruby just looks for =begin/=end followed by a space
| | | + 3309 [toshirok@yb ] And RDtool ignore fragments like
| | | | 3312 [hgs@dm .a .u] Excellent! I didn't spot that or I forgot it.
| | | | 3314 [Dave@th ma e] Before we go reinventing too many wheels here, why don't we all just
| | | | 3330 [schneik@au t] You took the words right off my keyboard. ... Except I had a different
| | | | 3352 [hgs@dm .a .u] "[...]keywords and formats that have been accepted by the Ruby community.
| | | + 3342 [matju@CA .O ] should also accept spaces before =begin/=end, for multiple reasons.
| | + 3324 [igarashi@ue ] I am probably one in the latter ;-)
| |   3341 [matz@ne la .] And me, as the inventor of the RD format, is the former.
| + 3319 [wscott@ic ip] Cool it.  I didn't want to sound that enthusiastic! :)
|   3320 [Dave@th ma e] For what? We plan on keeping it available. If you want it in different
|   3321 [aleksi.nieme] Well, you sounded like one :). Ok, I'm chilled again.
+ 3299 [toshirok@yb ] good idea! :-)

Re: dev.rubycentral.com
3302 [aleksi.nieme] There's some "normal" :) trash at
3303 [aleksi.nieme] Maybe I should've tested first and then write, but I was and still am a
3307 [Dave@th ma e] Sorry about that - this LaTeX to html conversion is tough, but we'll

RubyUnit assert_raiseexception
3311 [feldt@ce ch ] Is there a better way in RubyUnit to check that a method raises an
3315 [Dave@Th ma e] The later ones support
3325 [aleksi.nieme] While we're on it I'd like to make another request. The new version of
+ 3329 [Dave@th ma e] All our tests subclass TestCase with our own, which includes the
+ 3474 [CQN02273@ni ] I have coded assert_equal_float the version with epsilon checking.
  3479 [aleksi.nieme] How about
  + 3481 [feldt@ce ch ] IMHO, it would be nice if assert_equal_float accepts both Epsilon and
  + 3492 [CQN02273@ni ] I have one question and one suggestion.

Orb for Ruby?
3317 [olczyk@in er] Just stumbled across the language and I have a few questions about it.

GUI support in Ruby?
3318 [olczyk@in er] What kind of GUI support is there in ruby

Calling C/C++.
3322 [olczyk@in er] In perl and python you can call C/C++ routines via swig.
3326 [aleksi.nieme] It's ok.
3403 [fukusima@go ] I'm currently working toward merging the ruby module with SWIG

Re: BUG or something? Dealing with $; $/ $, and so on.
3323 [schneik@au t] Well, I like the original thought--but not the idea of implementing

FW:  GUI support in Ruby?
3327 [aleksi.nieme] Went directly to asking person, now to the list.
3343 [olczyk@in er] Puhleeeaaase. Of all the open source things I can do, why would I want

FW:  Orb for Ruby?
3328 [aleksi.nieme] Went directly to the asking person, now to the list.

Selling Rubies by the Carat
3331 [Dave@th ma e] ______________________________________________________________
+ 3332 [schneik@us i] #  ______________________________________________________________
+ 3333 [gnhurst@hu s] As I mentioned in [ruby-talk:01467](see below), I would call it
+ 3344 [matju@CA .O ] for a start... a little technical, but I'm trying to avoid the S-word.
| 3350 [aleksi.nieme] You want code fast, test your ideas, pay little attention to unnecessary
| 3356 [DDouthitt@cu] I can say why I learned it (which has been quite recently). In my case, any benefit from Ruby had to overcome what benefits there were from using Perl and Korn Shell (both of which are quite powerful!).
| + 3357 [DDouthitt@cu] Ah, poetry!
| + 3360 [hgs@dm .a .u] Where I heard about it?  One of the language lists on the web, or
+ 3393 [matz@ne la .] Thank you for the followups; may I add comments from you guys to our
| 3397 [schneik@us i] Matz writes,
+ 3495 [schneiker@ju] Have you considered requesting that "The Object Oriented S*****ing Language"
  3502 [Dave@th ma e] Matz?
  3578 [matz@ne la .] Well, even though Ruby is a very-high-level-object-oriented-language,

Japanese to english translator
3334 [Dave@th ma e] Every now and then, something pops up on ruby-list that I'd love to be
3335 [schneik@us i] # Every now and then, something pops up on ruby-list that I'd love to be

How did the recent wave of Ruby newcomers discover it?
3336 [schneiker@ju] I'm interested in finding out how all the people who recently (and not so
+ 3337 [alwagner@tc ] I saw an announcement that Ruby had it's own newsgroup on
+ 3345 [matju@CA .O ] For the record, I don't remember.
+ 3346 [hipster@xs a] LinuxToday mentioned the article about ruby on IBM AlphaWorks.
+ 3349 [neumann@s- i] From time to time a look at www.cetus-links.org for new languages. I found
+ 3371 [wscott@ic ip] Someone posted a message on comp.lang.python  :)
+ 3582 [kevh@cg ca l] I think I first heard about it on memepool.com back in February.
  3586 [aleksi.nieme] Make it two.

PID of child processes
3338 [Andy@To ls e] I'm missing something obvious here, I think.  Is there an easy way
3390 [matz@ne la .] Oops, there's no way but $? to retrieve wait status.  We had better
3400 [Dave@th ma e] [ status, pid ] = Process.wait2
+ 3401 [andy@To ls e] But isn't there a race condition there?  What happens if two
| 3405 [matz@ne la .] I don't think so.  The value of $? is set only on occasions such as
| 3414 [andy@To ls e] I like it.  Under Linux, variants of wait taken from BSD
+ 3404 [matz@ne la .] I should have designed Process.wait returns both information.
+ 3455 [matju@CA .O ] Interesting. According to the Linux documentation, there is a wait(), a

Re: Mailing List - Would Like to Join
3347 [breech@br nt] I would like to join the mailing list for Ruby.  Thanks.
3348 [matz@ne la .] You mean you want to read messages via mail, not news, right?
3354 [schneiker@ju] There is also the newsgroup comp.lang.ruby, in case you didn't know about

What GUI lib are you using on WinNT/Cygwin?
3351 [feldt@ce ch ] I'm still having troubles with tk. I'd like to know if anyone out there is

Potential problem: Linksoft Corp, Ruby Toolset
3353 [feldt@ce ch ] It's a SW company that have a toolset with the name of Ruby. From their
3355 [schneiker@ju] "Robert Feldt" <feldt@ce.chalmers.se>

3358 [DDouthitt@cu] Is there any way to manipulate the list of processes set to run at execution by at_exit? Can it be cleared out or reset? Can processes be removed?
3361 [Dave@th ma e] Well, you could write your own. This example uses a couple of 1.5
3365 [aleksi.nieme] Thanks for your efforts and good example of easy to read code. First I'd
3378 [Dave@th ma e] rather than that way!
3409 [m_seki@mv .b] module AtExit

Exception Handling
3359 [DDouthitt@cu] 1. What is a good use of this construct?
+ 3362 [DDouthitt@cu] More interesting details....
+ 3364 [Dave@th ma e] It helps to catch exceptions that would otherwise terminate your

3363 [DDouthitt@cu] I was looking at the documentation for chomp and chomp! - and the results of chomp startled me to say the least.
3366 [Dave@th ma e] Maybe, but it wouldn't be 'chomp'. Chomp removes the given string
+ 3367 [aleksi.nieme] Well, this all seem so right to me. You're expecting "now".chomp("ow") to
| 3368 [DDouthitt@cu] Like me :-)
| 3369 [DDouthitt@cu] From your description things finally CLICK for me :-)
| + 3370 [aleksi.nieme] Well, the biggest difference compared to your description is that one can
| | + 3372 [aleksi.nieme] Uh, there surely is something interesting things with chop-family. Could
| | | 3373 [decoux@mo lo] chop (i.e. the global function chop) modify $_
| | | + 3374 [decoux@mo lo] String#chomp don't return nil
| | | + 3376 [gotoken@ma h] Wow, I don't know that!
| | + 3379 [matz@ne la .] String.chomp does not return nil neither.  OTOH, String.chomp! may.
| |   3385 [schneik@au t] So is there some grand overall plan, principle, reasoning, or system to all of
| |   3386 [matz@ne la .] It's natural for me.
| + 3377 [Dave@th ma e] You once, were lost,
+ 3380 [matz@ne la .] Equivalent to `$_ = $_.chomp(aString)'.
  3381 [Dave@th ma e] Well yes... but our version uses more words, so it must be better ;-)
  3383 [matz@ne la .] Are you saying the same thing?  Well, sorry.
  3384 [Dave@th ma e] I think so, but yours is better (and is now the new wording)
  3388 [matz@ne la .] This requires you have to update your document.  Is this OK for you?
  3399 [Dave@th ma e] I _think_ the external interface is unchanged by this -- all that
  3416 [aleksi.nieme] Well, this time we're optimizing, writing less code and it's more readable.
  3417 [Dave@th ma e] Feel free! However, it's an internal C method, so it would probably be

3375 [DDouthitt@cu] I was awandering.....................
3382 [matz@ne la .] Fixed, thank you.

Exit in eRuby
3387 [phasis@ma l.] When I tested following code with eRuby 0.0.8, eRuby error occurred.
4066 [shugo@ru y- ] Sorry, this is a bug.

InformIT article
3389 [matz@ne la .] matz.
+ 3391 [schneik@us i] # Hi,
+ 3392 [gotoken@ma h] A table seems broken
  3395 [matz@ne la .] Thank you.  Could you report to them at InformIT via

How to install irb?
3394 [jilanik@ti .] as subject.
3396 [nosuzuki@e- ] irb is already install if you are installed ruby-1.4.4 or later

3398 [hgs@dm .a .u] May I suggest the following patch to the ruby-1.4 manual to allow ease of
3406 [matz@ne la .] Thank you.

IRB list commands
3402 [jilanik@ti .] could somebody tell me where can I find a list of IRB commands?

Waffling between Python and Ruby
3407 [embed@NO PA ] I was looking at the Ruby editor/IDE for windows and was disappointed with
+ 3408 [davidw@li ux] You could always try elastiC, at www.elasticworld.com :-)
| 3411 [olczyk@in er] I don't think so. There's nothing there.
+ 3413 [matz@ne la .] In Ruby, library files are mere aggregation of classes, modules and
| 3415 [andy@To ls e] Argh!  Don't do it!
+ 3424 [mjackson@wc ] Indulge my curiosity - how many times has this actually happened in
| + 3425 [hzhu@kn wl d] C-x h M-x tabify
| | 3428 [jkraska1@sa ] <esc>:1,$s/<tab>/    /g
| | 3430 [aahz@ne co .] ^[:%s/\t/    /g
| + 3435 [olczyk@in er] 1) I have to correct for a condition that I forgot to test for.
| + 3438 [embed@NO PA ] I admit that using a proper editor helps. When using IDLE, or PythonWin, it
| | 3439 [hipster@xs a] "Most people's [C] programs should be indented
| + 3442 [garry@sa e. ] well, i'm not warren, but over the last several years of
| | 3464 [jajs@NO PA r] Garry Hodgson dijo sobre Re: Waffling between Python and Ruby,
| + 3470 [kens@si ht e] ...
+ 3427 [jkraska1@sa ] IMO, the solution to this is to tab to be an illegal character
+ 3429 [nhodgson@bi ] with
+ 3469 [kens@si ht e] ...
+ 3475 [CQN02273@ni ] These features are in my ToDo list.
  3480 [nhodgson@bi ] I tried to write a Scintilla lexer for Ruby today but gave up as it
  3489 [aleksi.nieme] From the top of my head (which has sometime looked into parser briefly) I'd