94267-96840

94059-95427 subjects 94487-94838

Aliasing and the back-quote
94267 [bob@pe rc -f] ...
94269 [hal9000@hy e] The bactick is a special case, with a special syntax. It's the only

Calling ruby scripts
94276 [bob@pe rc -f] ...
+ 94278 [rodrigo.berm] if you are on linux/unix
| 94283 [bob@pe rc -f] That's not it.  I have hello and tst1 through tst7.  They are all
+ 94281 [joe@no ch rl] What happens if you type "/usr/bin/env ruby --version" on the command
| 94285 [bob@pe rc -f] That's not it.  I am using the same first line in several other scripts.
+ 94286 [nobu.nokada@] I vote line ending code issue.
  94288 [bob@pe rc -f] That was it!!  Hello came from a Windows machine where lines end in
  + 94295 [nobu.nokada@] Yes, but the OS kernel doesn't nor env doesn't strip it.  You
  + 94310 [wsdng@on in ] Have a look at the command "recode", which is availiable on most linux
    94341 [bob@pe rc -f] I'm running BSD on a Mac PowerBook G4.  However, Uwin (Unix for

More alias problems
94277 [bob@pe rc -f] ...
+ 94280 [assaph@av ya] Ruby aliases are just making an object respond to a different name with an existing method; not expanded like shell aliases.
| 94287 [bob@pe rc -f] ...
| 94289 [hal9000@hy e] Aliases aren't macros, and the parser doesn't have the artificial
| 94294 [bob@pe rc -f] Thank you.  That explains the situation exactly.  If I understand you
| 94296 [assaph@av ya] At a guess, I'd say the interpreter knows that "operators" have a magic
+ 94291 [Peter.Vanbro] You're mixing up syntax and semantics. Syntactically, + is treated as an
  94293 [Peter.Vanbro] Wanted to cancel after Hal's reply, but sent it by accident (x and c are

Re: [Q] --with-static-linked-ext
94279 [rodrigo.berm] ...

Ruby 1.8.1 and forwardable warnings
94282 [djberg96@ho ] Ruby 1.8.1
94292 [nobu.nokada@] I guess those methods should be skipped, perhaps in

convention for internal class/module name?
94298 [lists@za a. ] Since Ruby forbid _Foo, what is the convention for internal class/method
94299 [pbrannan@at ] What do you mean by "internal"?  A class that shouldn't be accessed by
94302 [lists@za a. ] Yes. In my case, it's several different implementation per platform.
94317 [rubyguru@ho ] module FooInternals

How to use Ruby's Rinda::Ring
94305 [drbrain@se m] After studying Masatoshi SEKI's translated Rinda::Ring description, the
94359 [m_seki@mv .b] good page. I linked your page. thanks a lot.

RubyCocoa problem:multiple definitions of _rb_obj_clone
94306 [ptkwt@ar cn ] I installed Ruby 1.8.1 on OS X 10.3 using the darwin ports as someone
94315 [discord@ma .] Okay, this is way beyond my knowledge... Perhaps this would be a good

The opposite of .succ!   (though it still may)
94312 [gltewalt@ya ] # An opposite to .succ!   Or, a predecessor method for String.
+ 94364 [billk@ct .c ] IRB can be a big help in trying out bits of code interactively...
+ 94389 [discord@ma .] First of all: You're doing too much work! :D there are a couple things
+ 94438 [batsman.geo@] => "abcc"

Parrot now has objects
94316 [joe@no ch rl] According to http://use.perl.org/articles/04/02/29/2124204.shtml, Parrot
94415 [msparshatt@y] I've recently started a rubyforge project to do just this. At the moment

plruby: --enable-static-ruby / --disable-shared ?
94319 [lists@za a. ] What about adding these configure option, so plruby.so doesn't need
+ 94320 [decoux@mo lo] What is your version of plruby and ruby ?
| 94325 [lists@za a. ] plruby 0.3.9, ruby 1.8.1 (using Ian's binary RPM).
| 94328 [nobu.nokada@] Don't link libruby-static.a to shared objects.  It is for
| 94329 [decoux@mo lo] plruby is not an extension library.
+ 94335 [decoux@mo lo] Well, this is a little more complex. Try it with
  94339 [lists@za a. ] Thanks, with --safe-level it works (though I don't understand why/what
  + 94340 [decoux@mo lo] Except that it's a very *BAD* idea and don't repeat that this option exist
  + 94343 [decoux@mo lo] Try this
    94408 [lists@za a. ] Thanks!

JRuby and Class.forName()
94326 [yvon.thorava] 1 require 'java'
94333 [ndrsbngtssn@] [---]
94334 [yvon.thorava] tanxs for your answer, i did some progress in the meantime

Code samples
94342 [bob@pe rc -f] I am trying to learn ruby 1.6.8 on a Mac PowerBook G4.  I bought the
+ 94347 [bob.news@gm ] "Robert Peirce" <bob@peirce-family.com> schrieb im Newsbeitrag
| 94371 [bob@pe rc -f] Great resource.  Thanks.
+ 94350 [rasputnik@he] Look at rubyforge.org or RAA.
| 94372 [bob@pe rc -f] Rubyforge is too complex for learning, but the Ruby Application Archive
+ 94370 [vjoel@PA H. ] Just guessing, but the windows package doesn't always include all the
| 94373 [bob@pe rc -f] Thanks.  That's more than enough to get started with.  Plus there are
+ 94483 [gltewalt@ya ] Did you look in  ruby-1.6.8/sample   ?
  94509 [bob@pe rc -f] I don't have that but I downloaded 1.8.1 and found its sample directory.

Problems with Ruby under Windows XP
94345 [kecik.yalin@] I have installed ruby with "ruby181-11.exe" on Windows XP and wanted to try
+ 94349 [neoneye@ad l] welcome to Ruby  ;-)
| 94351 [kecik.yalin@] Thanks,
| + 94354 [neoneye@ad l] p "hello"               # "hello"
| + 94363 [dave@pr gp o] If you want Ruby to output a value, you need to say something like
+ 94353 [curt@hi bs c] The result of expressions are not automatically dumped to the console
+ 94355 [dennis.ranke] The problem is that "a[0]  ? 1" in the Ruby Programmers Guide doesn't mean

Images in Ruby
94356 [Peefh.AVIRER] Images in Ruby
94618 [Peefh.AVIRER] Eureka!

GCC 3.3.3 and Ruby 1.8.0 and 1.8.1
94357 [brett_willia] We recently upgraded to GCC 3.3.3 and now we can no longer compile ruby
+ 94383 [andrew@wa ro] Ruby successfully compiled the latest stable snapshot with 3.3.3, so perhaps
| 94384 [andrew@wa ro] Or, in English :) I have successfully compiled the latest Ruby 'stable
| 94390 [brett_willia] Thanks for the clarification :)
+ 94396 [nobu.nokada@] curses.c in 1.8.1 already uses stdarg.h if found.
+ 94421 [zeroth@da ko] Some time ago I backported a old version of ruby (1.0 something) to gcc

eval + taint problem
94360 [neoneye@ad l] Should taint information be propagated around?
+ 94362 [decoux@mo lo] $SAFE = 1
| 94365 [neoneye@ad l] Then it raises as its suppose to..
| 94367 [decoux@mo lo] taint is useless with $SAFE = 0
| 94368 [neoneye@ad l] This information is new to me.
+ 94387 [fgp@ph o. rg] I believe you shouldn't eval tainted code in the first place - IMHO,

[ANN] SWS 0.2 released
94374 [childNOSPAM@] I am proud to announce new release of SWS web development library.
+ 94385 [gavin@re in ] I'm just about to embark upon a large application, and am very
+ 94410 [martindemell] Looks wonderful! As a big fan of the WebObjects philosophy, I'm
+ 94431 [mnestler@wh ] How does SWS compare to CGIKit or other WebObjects-like frameworks? I
| 94507 [childNOSPAM@] The most usual question - I think I'll add the answer to the
+ 94590 [yvon.thorava] ruby 1.6.8 (2002-12-24) [powerpc-darwin7.0]
  94591 [childNOSPAM@] I didn't test it with Ruby 1.6, but I'm afraid you need to upgrade.

taint resurrected unexpectedly (1.8.1)
94375 [billk@ct .c ] I'm seeing something seemingly incorrect in a CGI script
94380 [news@st d. t] Does CGI#[] still return an array? I thought this had changed, but at
94381 [billk@ct .c ] Aha!

Ruby translation for UNIX scripting command
94376 [tluedeke@ex ] Quick (and slightly embarassing) newbie question for the Ruby experts. I'm trying to learn Ruby, and move away from antediluvian UNIX scripting.How do I make a sequence of pattern matching lines in a file, then extract a particular field from the line? For example, in UNIX talk if I were interested in finding all lines with a particular match pattern "test", and printing the fourth field, I'd do a grep plus awk command such as:grep "test" file_name | awk ' { print $4 } ' &gt;&gt; output_fileHowever, in my Ruby books, I don't see any discussion about the function equivalent of printing a field of the type "$4" (i.e. fourth field). I can get the lines out of the search file, but I'm not quite sure how to determine fields.Thanks.TPL
+ 94377 [thomas_adam1] You win the UuoGA (Useless Use of Grep Award). Why not let awk to the
| 94378 [tluedeke@ex ] ette.net" We'll just save up your sins, Thomas, and punish you for all of them at once when you get better. The experience will probably kill you. :)"-- Benjamin A. Okopnik (Linux Gazette Technical Editor)___________________________________________________________Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html
+ 94379 [surrender_it] open('filename').grep(/pattern/).split[4]
| 94392 [discord@ma .] except that element number four is the fifth element. no, not the movie
| 94406 [flgr@cc n. e] filtered_data = File.read("input_file").grep(/pattern/) \
+ 94423 [bob.news@gm ] "Thomas Luedeke" <tluedeke@excite.com> schrieb im Newsbeitrag

Problems with RI? (was: Re: Ruby 1.8.1 on OS X Panther and RubyCocoa)
94382 [discord@ma .] have would be basically the same. It really isn't. I'm renaming this

Re: Bus Error with tk app
94386 [wmwilson01@h] Is this a bug?
+ 94395 [nobu.nokada@] Try CVS HEAD version.  There were some significant fixes after
+ 94402 [nagai@ai ky ] Probably. But I cannot do enough test your script because I don't

[ANN] RSSscraper - Get RSS feeds from virtually any website!
94388 [Qty@ro ke ma] Get RSS feeds from virtually any website! RSSscraper generates RSS

ruby web spiders?
94391 [ bob@bo .c m] are there any web spiders/crawlers written in ruby?

Compiling 1.8.1
94397 [bob@pe rc -f] I have a small problem.  I use /local instead of /usr/local.  What do I
94398 [flori@ni e. ] $ sh configure --prefix=/local
94399 [bob@pe rc -f] Thanks.  That was easy!

Special characters: (TM), (R)
94400 [intc_ctor@ya] I need to output a company name and legal requires that we put the
+ 94403 [tim@ba es id] `puts 174.chr` gives me a little (R) symbol that's rather difficult to
| + 94404 [gavin@re in ] "The Absolute Minimum Every Software Developer Absolutely, Positively
| | 94433 [discord@ma .] It looks like a character encoding issue... When I set my terminal to
| + 94437 [ptkwt@ar cn ] I think you're right.  Now that I'm on a LInux box I see the (R) char
| + 94588 [kapheine@hy ] I wouldn't use (R) and (TM). I have read in various places that (C) is
|   94688 [ jupp@gm .d ] Wether (C) is acceptable or not depends on the country. In Germany it
|   94736 [jwkenne@at g] Assuming that you mean the drug, that's "Heroin", in either German or
|   94844 [ jupp@gm .d ] Sorry, I was a bit confused because in German 'Heroine' means an
+ 94505 [ jupp@gm .d ] In my complete list of ISO 8859 charsets I only find ? in

bug reports for ruby?
94401 [cere@u. as i] Does anyone know/if where a central place for this exists?
+ 94409 [me@pr va y. ] ...
+ 94412 [djberg96@ho ] There used to be, but it got overrun with spam.  Generally, people

has anyone made an all-Ruby website?  how'd it go?
94407 [ruby@hi me i] I run a website that's all PHP now, but was due for
+ 94420 [raphinou@ya ] I am in the same situation as you, and began to look at cgikit.
+ 94428 [jamesUNDERBA] Not sure what you mean by "interactive", but I have a number of sites
+ 94430 [khaines@en g] Yes.
+ 94468 [cpine@he lo ] It's not terribly interactive, but it does actually run the example scripts
  94484 [sdate@ev re ] "Chris Pine" <cpine@hellotree.com>

rublog and mod_ruby (was: mod_ruby & Apache)
94411 [rob_m_mckinn] I have a similar difficulty trying to run rublog with mod_ruby on
+ 94425 [dave@pr gp o] If you come up with a solution for this, please send me a patch and
+ 94545 [me@pr va y. ] Yep, that is exactly what is happeing to me.

37signals?
94413 [hal9000@hy e] Did anyone ever hear back from 37signals?
+ 94416 [surrender_it] you should have read rubygarden
| 94417 [surrender_it] I didn't. forget about me :(
+ 94418 [ruby@hi me i] I'm oh-so-curious about the "web-app framework Rails" that the

ruby and jRuby and PostgreSQL
94414 [yvon.thorava] i'm able to connect to a PostgreSQL database using ruby or java.

random range
94424 [cc1@ce .w st] Why doesn't rand take an integer range and then generate a random number
94432 [hal9000@hy e] Charles,
+ 94434 [vjoel@PA H. ] Would be tricky for general Enumerables...
| 94436 [dblack@wo bl] I'm not quite following (?) -- I think the original idea was
| + 94439 [vjoel@PA H. ] Wouldn't size be infinite in this case?
| | 94440 [blackdav@sh ] Right -- I now see what you mean.  I had Array tunnel-vision.
| + 94441 [discord@ma .] Please don't redefine a Kernel method. I think that's a Bad Idea(tm).
|   + 94448 [cc1@ce .w st] Why is redefining a kernel method to take a different class of argument
|   | 94450 [discord@ma .] It's not redefining rand to take more varied arguments that's a bad
|   | + 94456 [dblack@wo bl] You must not be very fond of IO#gets, Thread#exit, Dir::open, or
|   | | 94462 [discord@ma .] point taken :) Still, with IO#gets and Thread#exit (I admit I haven't
|   | | 94481 [gltewalt@ya ] First off let me apologise if I double post.
|   | + 94466 [mghallNO@en ] I agree, FWIW.
|   | | 94480 [gltewalt@ya ] What about this...
|   | | 94503 [cc1@ce .w st] yes but what happens when someone says
|   | + 94504 [cc1@ce .w st] That's kind of interesting, I have always thought that half the reason
|   + 94451 [g_ogata@op u] module Enumerable
|     94476 [cc1@ce .w st] Umm I don't think that is a uniform distribution, not to mention the
|     94479 [batsman.geo@] It *is* uniform...
|     94500 [discord@ma .] => 10000
+ 94435 [dblack@wo bl] I'm the one who said that, and I was actually referring to the
+ 94442 [ptkwt@ar cn ] I like this a lot.  Please submit an RCR.
+ 94445 [cc1@ce .w st] Well I wasn't in the IRC channel, it gets filtered on my connection, but

freeze, frozen? in extensions
94429 [cyclists@nc ] I'm poking around in the 1.8.1 ext/ sources and I notice that there are
+ 94485 [dooby@d1 .k ] Calling a C extension which uses rb_str_modify() and /not/ rb_check_frozen_p()
| 94486 [decoux@mo lo] well, I can give you an exception. In plruby you have
| + 94488 [cyclists@nc ] Today I see that I my original post was terse to the point of being
| | + 94489 [decoux@mo lo] raise an error.
| | | 94498 [bob.news@gm ] "ts" <decoux@moulon.inra.fr> schrieb im Newsbeitrag
| | | 94499 [decoux@mo lo] It depend what you call ruby :-)
| | + 94491 [dooby@d1 .k ] Did you look for use of the OBJ_FROZEN(obj) macro, also ?
| |   94496 [cyclists@nc ] Good suggestion! I see it used in openssl and stringio.
| + 94490 [dooby@d1 .k ] I'm checking for holes in my life-boat.
+ 94540 [matz@ru y- a] I encourage extension writers to add frozen/security check to their
  94568 [Tim.Hunter@s] Thanks, matz! I spent most of yesterday afternoon adding calls to

How can I get the callers __LINE__ and __FILE__?
94443 [sroberts@un ] def debug(*objs)
+ 94444 [sroberts@un ] def debug(obj, f = __FILE__, l = __LINE__)
+ 94446 [dave@pr gp o] Have a look at Kernel#caller
  + 94447 [sroberts@un ] Thanks, thats what I want.
  | 94449 [msparshatt@y] It's not quite what you want but you access your callers context by
  + 94549 [bob.news@gm ] "Dave Thomas" <dave@pragprog.com> schrieb im Newsbeitrag

Whitespace Syntax Error?
94452 [gregbenx@ya ] I'm using: ruby 1.8.1 (2004-01-27) [i386-mswin32]
+ 94453 [rpav@me hl .] 20 million will answer this ahead of me probably, but remember...
+ 94454 [g_ogata@op u] It's whitespace neutral where it's unambiguous.  The problem here is
+ 94455 [news@st d. t] Not possible, AFAIK.
+ 94458 [gregben_x@_y] Thanks everyone, for the quick reply!

Whitespace syntax error?
94457 [gregben_x@_y] I'm using: ruby 1.8.1 (2004-01-27) [i386-mswin32]
94463 [discord@ma .] It's not a bug, it's expected behavior. The problem is that when you

[ANN] GCBoard :  Boardgame API for gtk
94459 [kristof@vl e] I have written a library to create Chess-style boardgames with Ruby (and
94460 [hal9000@hy e] That's cool. I'm always in favor of more games.
96840 [kristof@vl e] I am sorry, Go, Othello and Pente are not supported.

Converting Line ends using Ruby (Was: Calling ruby scripts)
94465 [ jupp@gm .d ] DOS -> UNIX: ruby -p -i.bak -e '$_.sub!(/\r$/,"")' file_name
94478 [surrender_it] you can safely omit $_, just use Kernel#gsub that is $_.gsub by itself

I know I am beginning to sound whiney...  but I need help  :/
94467 [candiazoo@co] ...but now I have rebuilt my system, and installed ruby, installed
94471 [jgb3@em il b] Try looking in the mkmf.log file -- it should explain why the last check
94474 [dooby@d1 .k ] I added a dir_config to the extconf.rb file to install.

'require' and installing / using new libraries
94470 [itsme213@ho ] I just downloaded Foxtails (the FXRuby extensions), and upon running the
94473 [vjoel@PA H. ] You can install to another directory by doing
94501 [itsme213@ho ] (Hyperlink
+ 94511 [vjoel@PA H. ] Normally, '.' is on the require path, $:. But that does not help if you
+ 94592 [timsuth@ih g] [ruby-talk:92675]

install.rb, why doesn't it have a uninstall option?
94472 [sroberts@un ] I can simulate by running install in --no-harm mode, and then deleteing
94621 [ jupp@gm .d ] '--no-harm' should be taken literally. Overwriting files is only one

Request patch to Win32API.c
94475 [mdavis@se as] I would like to request an enhancement to Win32API.c to support short integers.  This is needed so support an ODBC interface I am working.  The return codes from all ODBC function calls through Win32API are incorrect using 'i' or 'l'.  Adding support for 's' (short int) corrects this problem.  Here is the diff of Win32API.c from Ruby 1.8.1 and my working code with support for short integers.  Please let me know if there is any thing I can do to help this enhancement along.
+ 94477 [dooby@d1 .k ] In the meantime ...
| 94494 [mdavis@se as] Thanks.  This very work around help me identify where the real problem was.  My only concern with this implementation is the over overhead associated with every function call.
+ 94539 [matz@ru y- a] I'm not the one to decide, but at least you'd better use unified diff
| 94541 [mdavis@se as] Thanks.
+ 94543 [usa@ga ba ec] You can use Ruby/DL.
  + 94553 [robertm@sp l] Morning,
  | 94559 [usa@ga ba ec] Ah, I should say;
  | + 94569 [mdavis@se as] Is there any English documentation for Ruby/DL?
  | | 94570 [happy@us r. ] there's ext/dl/doc/dl.txt file in cvs. And yes, Ruby's GC will release
  | + 94571 [surrender_it] I wonder: there is a generalized effort to port bindings for C library
  + 94554 [sdate@ev re ] When will this deprecation be in effect ?
    94560 [usa@ga ba ec] We are planning to remove Win32API from Ruby distribution.
threads.html
top