68042-68581 subjects 68436-69390

FXruby on osx
68249 [aakhter@ci c] I'm trying to get Fxruby to work on OSX (10.2.4). I do have fink installed.

Problem with ri and sqlsh.rb
68252 [starflow7@at] ir.rb is not in the ruby\bin directory (as the README file suggests).

Saving code written during an irb session
68254 [W.L.Kleb@la ] OK, so I admit: I'm stupid.  How do I save the code I've generated
+ 68255 [gsinclair@so] You're not (necessarily) stupid.  irb has no obvious code export
| 68258 [chadfowler@c] ...
+ 68256 [bobx@li ux a] Looking quickly through the nutshell book it doesn't give a way to save an
+ 68257 [ms@ia ta e. ] Quoth Bil Kleb <W.L.Kleb@larc.nasa.gov>
+ 68259 [gsinclair@so] Done it.  Put this in your ~/.irbrc
| + 68262 [gsinclair@so] Array.  But it doesn't #to_s like an array of strings, nor does it
| + 68269 [jim@fr ez .o] Wow. Thanks Gavin. If I may, I have modified your code just
|   + 68293 [botp@de mo t] dummier question: Now, how do I load a (script) file to irb (history)?
|   | 68300 [jim@fr ez .o] Hmm, I've seen posts on how to run a script and then have
|   | 68315 [gsinclair@so] def loadhist(path)
|   + 68327 [chrismo@cl b] Is Readline a 1.8 thing?
|     68335 [gsinclair@so] No, more likely a platform thing.  What are you using?  All the same,
|     68338 [chrismo@cl b] win2k. It can't find 'readline' which I suspect is expected on Windows, IIRC
+ 68321 [bob.news@gm ] I do it the other way round: Typically I write the code in an editor and
  68322 [jim@fr ez .o] I have not had the best of luck with that. I have not pinned down
  + 68332 [gsinclair@so] I sometimes just 'require' the file I'm working on.
  + 68333 [bob.news@gm ] "Jim Freeze" <jim@freeze.org> schrieb im Newsbeitrag

RubyCocoa and sheets
68261 [ jimm@io co ] I'm using RubyCocoa, translating an Objective-C checkbook application to
68287 [shirai@ko in] Does this article help you?

writing a 4 byte Integer to socket
68264 [surrender_it] I need to write a value (it should be a Fixnum, but I'm not sure) over
68266 [billk@ct .c ] Array#pack is probably what you're looking for...
68275 [B.Candler@po] For an example of this in real code, install druby and look at drb/drb.rb
68280 [surrender_it] thanks Brian and Bill !

[ANN] xml-simple 0.6.0
68267 [contact@ma k] Yo!
+ 68291 [botp@de mo t] Yikes! this is too simple (indeed) to be true.
+ 68319 [ jupp@gm .d ] Josef 'Jupp' Schugt       http://jupp.tux.nu       jupp(AT)gmx(DOT)de
| 68339 [batsman.geo@] The author must find this really flattering :)
+ 68355 [han.holl@po ] I downloaded the zip file (twice) and get, on
  68359 [contact@ma k] I'm sorry! For a reason that is still a mystery to me, my FTP

inspect question/request
68268 [nemo@he lo r] When Ruby stumbles upon an object with a missing method, it says something
68289 [matz@ru y- a] Yeah, right.  It's been like that from the beginning, but I don't
68290 [nobu.nokada@] If the object doesn't have "inspect", it will cause infinite
68292 [matz@ru y- a] I don't think so.  There's Object#inspect defined, so that it would
68296 [nobu.nokada@] But it were happen, it might be hard to detect, I guess.  Or
68299 [matz@ru y- a] Who wants to undef "inspect"?
+ 68302 [vangczung@ya] If something, no matter how stupid, is possible, then someone, somewhere
| + 68305 [nobu.nokada@] Yes, it will be possible and parhaps reasonable.  I just tried
| + 68306 [matz@ru y- a] I know.  I did it once, and asked myself how often it occurs, and how
|   68308 [vangczung@ya] I doubt that the test would affect the performance of correct code if
+ 68313 [gsinclair@so] A thread some time ago discussed the creation of absolutely plain
  68314 [matz@ru y- a] Sounds reasonable.  You succeeded to persuade me.

Hard coded newline characters
68271 [dave@la dr t] There are a surprising number of ruby source files that have newline
68286 [nobu.nokada@] Interesting but I doubt its necessarity and worthfulness.
68328 [dave@la dr t] Likewise with your reply.
68334 [vangczung@ya] Ouch.
+ 68337 [decoux@mo lo] or perhaps
+ 68340 [tkynerd@sp m] I'm afraid I'm on David's side with this one. If I post here saying, "I
| 68344 [vangczung@ya] I can agree with that.  The difference is that this was a request for
| 68350 [tkynerd@sp m] -snip-
| 68351 [vangczung@ya] Hmm.. must've missed that one...
| 68353 [tkynerd@sp m] I guess so. I found it very rude and felt a rude response was entirely in
| 68357 [billk@ct .c ] To be fair, Nobu answered the question in two parts.  I didn't
| 68378 [nobu.nokada@] Thank you for better explanation of my intention than me, and
+ 68342 [dave@la dr t] This is exactly the type of elegant solution that I'm looking for.
  + 68343 [decoux@mo lo] You can have different at_exit
  + 68345 [decoux@mo lo] And with
  | 68349 [dave@la dr t] Works perfectly!  Thanks.
  + 68346 [james_b@ne r] Wow.  I have to disagree.  Time no longer allows me to read every message on
  + 68347 [vangczung@ya] Always a temptation; rarely worth it in practice... ;-)
  + 68352 [austin@ha os] David,

Regexp parse error
68272 [paul@fl or a] ntext =~ /^([0-9]+|[a-z])/
68273 [paul@fl or a] ntext.gsub! / +/, ' '
68277 [behrends@cs ] In this context, Ruby can and will interpret the slash as a division

68274 [meinrad.rech] i find it somewhat strange, that the "name"-attribute is a hash
68281 [contact@ma k] ...

[OT] Re: Article on secure code
68278 [slewis@pa ad] This is in fact the ideal behaviour if you're using dynamically allocated storage - you do one speculative snprintf, if that fails, realloc the buffer and snprintf again.  Very handy.

how to catch any exception "eval" throws
68279 [meinrad.rech] i tried
+ 68282 [surrender_it] everything beetween sqaure brackets means "optional".
+ 68283 [hal9000@hy e] I can never remember exactly how this works,
+ 68307 [ahoward@fs .] ~ > cat foo.rb
  68317 [batsman.geo@] Exception should be enough unless somebody is knowingly raising other

Obtaining the Archive Attribute of a File on Windows Systems
68285 [delynnb@ma .] Is it possible to check the archive attribute of Windows files using
68298 [nobu.nokada@] ...
68304 [maksa@se am ] require 'find'
+ 68312 [gsinclair@so] The command works in a Cygwin window.
| 68373 [botp@de mo t] and also on builds _without_ cygwin :-)
| 68385 [maksa@se am ] The attrib command will work anywhere, it's just that under the default W2K
+ 68462 [delynnb@ma .] Milan,

How to allow iteration over a collection that can be enumerated in multiple ways?
68297 [sroberts@un ] Kind of a general question.
68301 [sroberts@un ] I thought of a 3rd way, but I don't know if its too clever.
68303 [austin@ha os] I personally would look at it from an SQL-like perspective.

[BUG] TkVariable
68309 [ oct@zo .o g] in current ruby distribution (Debian and PragProg win32), there is a

ruby-dev summary 19878-19943
68310 [aamine@lo er] This is a summary of ruby-dev ML in these days.

Debugger Problems
68311 [seth@cq .c m] A few problems with the debugger using the 1.8 preview2.

syntax highlighting problem in vim
68318 [ jupp@gm .d ] header = [ /^Date: /,
+ 68325 [kgergely@ml ] Negative. It is correct for me. How is it displayed at you?
| + 68329 [austin@ha os] header = [ %r{^Date: },
| | 68400 [hgs@dm .a .u] As is probably apparent from his posting, Gavin Sinclair is looking
| | 68483 [gsinclair@so] Hmmm... I hope not.  Doug Kearns is the maintainer of that beast.  I
| | 68485 [hgs@dm .a .u] Sorry for this.  I should have checked on RubyGarden
| + 68341 [batsman.geo@] Wrong colors and incorrect indentation when I make it reindent.
|   68397 [gsinclair@so] ...
|   + 68398 [batsman.geo@] I underlined it cause *I* did miss it. Just as I was about to reply "works
|   | 68401 [hgs@dm .a .u] Vim's manual was all I could find when looking online, plus reading
|   + 68405 [pbrannan@at ] When does ruby.vim get released?  Is it with vim itself?  What's the
|     + 68433 [n1k0@ro er .] You can put the file in ~/.vim/indent/ (for unix, im not sure about windows). If it doesn't work properly, remove it and vim will go back to using the file in /usr/share/vim/vim##/indent/
|     | 68496 [pit@ca it in] I think Paul was looking for a way to automatically prove that new
|     | 68545 [fugalh@fa co] You might think about posting it to vim.sf.net also. This sounds
|     + 68482 [gsinclair@so] It's extremely ad hoc.  I have very little ability with Vim scripting,
+ 68388 [djkea2@mu ca] Thanks. I'll fix it.

draft: ruby embedded into c++
68320 [0bz63fz3m1qt] I am working on a tutorial on how to embed ruby into c++.
68394 [botp@de mo t] I do not have ideas but comments only :-) I like your work, keep it up. Your
68396 [0bz63fz3m1qt] Thanks alot :-)

Change to /.../.match("foo") behaviour in 1.6.8?
68323 [austin@ha os] l, m1, m2 = /((?:\S+\s+){11})(.+)/.match(line)
+ 68324 [dblack@su er] I don't think that's changed.  Can you give a whole demo of the
| 68326 [decoux@mo lo] pigeon% ./ruby -ve 'a, b = /(.)/.match("ab"); p a,b'
| 68330 [dblack@su er] ruby 1.6.7 (2002-03-01) [i686-linux]
| 68331 [decoux@mo lo] I've understood but, like you, I was unable to reproduce this behavior
+ 68377 [matz@ru y- a] Put "*" before the expression, e.g.
  68379 [dblack@su er] I'm getting confused....  It looks like 1.8 goes back to the 1.4
  + 68383 [austin@ha os] I must correct myself -- I was originally using the 1.7 release by
  + 68386 [matz@ru y- a] It was a bug to be fixed.

[ANN] Text::Format 0.62
68336 [austin@ha os] == Text::Format 0.62

PP, PET, PMMA scrap
68348 [plastic_hans] To whom it may concern,

[Q] CGI::Session
68354 [rodrigo.berm] Have nice & productive  week everyone.
+ 68358 [ahoward@fs .] rodrigo-
| 68362 [B.Candler@po] Actually it does cache the query it found first time (by defining some
+ 68360 [kentda@st d.] I recently scratched a similar headache in mod_ruby w/ eruby. The CGI

Ruby Weekly News
68366 [Dave@Pr gm t] Ruby Weekly News: 03/31/2003

GUI development under Ruby
68367 [jennyw@da ge] I was wondering what people were using for GUI development. I've seen a
+ 68368 [dcarrera@ma ] The other big one is 'FXRuby' (http://fxruby.sourceforge.net/)
+ 68369 [surrender_it] You should not miss
| 68370 [jennyw@da ge] Seems to! I looked at the Fox page, though, and it doesn't list Mac OS X
| + 68371 [dcarrera@ma ] I don't think that exists yet.  There is a project to port Gtk1 to Aqua.
| + 68375 [jim@fr ez .o] Yes
+ 68409 [szegedy@no p] Mu favourity is Qt. It is a pity that QT extension project does not
| 68411 [0bz63fz3m1qt] I tried unsuccesfully to install/use  QT-swig..
+ 68606 [tomas_brixi@] BTW

ASN.1 basic/distinguished encoding rules for Ruby?
68372 [cjh_nospam@m] Has anyone built a library for ASN.1's BER or DER for Ruby?
68459 [mikkelfj-ant] I'm not aware of any generic ASN.1 package but Google "Ruby ASN.1" will

RubyCocoa and addresses of pointers
68374 [ jimm@io co ] Some methods in Objective-C require the address of a pointer, so the method
68420 [ jimm@io co ] I think I've answered my own question. You need to initialize the variable

FOX GUI  /  FXRuby tutorials
68376 [xlucid@us rs] Are there any tutorial web-sites for making some introductory FOX
68380 [LeiWENG@mo o] Are there any tutorial web-sites for making some introductory FOX

Ruby code for reading unformatted Fortran files
68381 [W.L.Kleb@la ] Does anyone have a code snippet to read Fortran unformatted files
68389 [B.Candler@po] If it helps, druby sends binary objects (Marshal strings) preceded by a
68395 [W.L.Kleb@la ] Thanks for the lead.  I'll take a look.

[RCR] Expose iv_get/iv_set to Ruby
68382 [austin@ha os] I have a potential need to deal with all of the instance variables in
68384 [nobu.nokada@] Kernel#instance_variable_get and #instance_variable_set are

unpack("V") returns Integer and not Fixnum
68387 [coma_killen@] This has probably been reported before but if not I thought I might

Re: Announce: RHDL-0.4.2 (UsersGuide updated)
68391 [ptkwt@sh ll ] I just updated the RHDL User's Guide with this info.  I also added more

J->E translation of Matz's interview on Slashdot Japan
68392 [news@sf .k i] Some of you might know that matz's interview has posted on
68407 [pate@ey er a] This is great stuff.  I look forward to reading and helping.  I just have
68413 [news@sf .k i] OK, I fixed it. Only-English-written page is provided now (except some
68476 [Steven.Grady] Very enjoyable -- thanks for posting, and doing the initial translation!
+ 68479 [maki@ru yc l] Fixed.  Clean up other sections, please :-)
+ 68480 [t00156to@sf ] I don't know what type of "mess up" you encountered exactly...
| 68487 [maki@ru yc l] Oh, sorry.
+ 68495 [jim@fr ez .o] Yes, I must agree. A very good interview. Matz is quite the

68393 [adewilliamsl] Barrister Adewale Williams (LLB).

Amrita substitution question
68399 [B.Candler@po] Any Amrita experts out there...
68408 [ahoward@fs .] # (1) replace 'REPLACE ME ' with some text

segfault in net/protocol.rb with xmlrpc4r
68403 [ps@so ut on ] ...
68470 [nobu.nokada@] Can't you try with newer release of ruby?  Some bugs had been

Re: Opera bookmark cleaner.
68404 [B.Candler@po] Welcome, and good start!
68406 [jason@jv eg ] The only problem with this is that the file does not get closed until
68486 [B.Candler@po] It's a good point about the file remaining open. You might want to note that

SIGSEGV and crash in $std***.print
68410 [abuse@du ch ] The following program creates a segfault or interpreter crash extremly
68475 [nobu.nokada@] It seems GC bug, although I couldn't reproduce the issue with
68508 [abuse@du ch ] GC == Garbage Collector or do you mean GCC?
68531 [nobu.nokada@] I meant the former, but yes, gcc-3's optimization seems wicked
68549 [pbrannan@at ] In what way is gcc-3's optimization wicked?  What workarounds are there

JRuby still alive?
68412 [Mark.Volkman] ...
68435 [ndrsbngtssn@] We've done some work since then that's in the CVS only. But none of us
68838 [arthur8@bo r] That's too bad...I was hoping to see JRuby 1.0 released, so that the
68888 [ndrsbngtssn@] I think the basic JRuby interpreter was developed pretty quickly too.

Re: OO vs. procedural programming
68414 [bob.news@gm ] "Peter Ensch" <nobody@bogus.com> schrieb im Newsbeitrag
+ 68416 [mike@os n. r] Hey it didn't _force_ me into that! :)
| 68450 [mikkelfj-ant] When it feels natural.
+ 68484 [gsinclair@so] I tend to create classes even for really simple apps, because Ruby
  + 68492 [bob.news@gm ] "Gavin Sinclair" <gsinclair@soyabean.com.au> schrieb im Newsbeitrag
  | + 68494 [michael_s_ca] I do believe there was a precedent to Java's "main()"....   =D
  | | 68503 [bob.news@gm ] "Mike Campbell" <michael_s_campbell@yahoo.com> schrieb im Newsbeitrag
  | | 68504 [michael_s_ca] Since C doesn't HAVE classes...  =)
  | + 68535 [gsinclair@so] Yeah, Java was perhaps my most-practiced language before Ruby,
  + 68493 [dblack@su er] def main

eval'ing a config file
68415 [ian@ca ib n.] I have a number of LDAP-related programs that I want to share a common
+ 68418 [pbrannan@at ] LDAP_HOST = 'foo.bar.com'
| 68530 [schatten@no ] Shouldn't it be `load' rather than `require'? `require' is looking for a
+ 68506 [batsman.geo@] Just for the eval part (IMHO the whole problem would be handled better
| + 68512 [ian@ca ib n.] Thanks, I didn't know about that method.
| + 68529 [bruce@co ed ] Personally, I'd sacrifice the equals sign, make it a colon, and call it a yaml
+ 68533 [warren@fr ed] dear ian,

Getting readline support on solaris
68417 [jim@fr ez .o] I have readline on my system (sparc 5.8), but I can't seem to get
68419 [djberge@qw s] You should be able to cd into the Ruby source, under the 'ext'
68422 [jim@fr ez .o] Well duh, don't I feel stupid.
68423 [djberge@qw s] Yeah, if it wasn't installed you would get a LoadError.  I have to admit
68430 [ahoward@fs .] ~ > ruby -e 'p require "readline"'
68432 [jim@fr ez .o] ruby -e 'p require("readline")'
68434 [djberge@qw s] Well, duh - I forgot irb automatically loads readline, so that's why I

sharing objects between tests (revisited?)
68421 [pbrannan@at ] I don't know if I've asked this on this list before or only on irc (I
+ 68424 [gfb@to es ft] How about
| 68429 [pbrannan@at ] This doesn't work, since there is a different instance of MyTest for
+ 68425 [gfb@to es ft] How about
+ 68426 [gfb@to es ft] How about
+ 68427 [gfb@to es ft] How about
| 68428 [bystr@ma .c ] Sorry for multiple posts, it is my company's mail server fault :-(.
+ 68431 [ptkwt@sh ll ] What if you make it a class variable instead?
| 68499 [pbrannan@at ] Then if I require the file with MyTest but I never run MyTest, I still
| 68501 [austin@ha os] require 'test/unit'
| 68519 [B.Candler@po] Or shorter:  "unless defined? @@f"
+ 68490 [sera@fh an .] Paul,
  68498 [pbrannan@at ] Your statements are correct for unit tests.