60051-63254 subjects 60480-64007

How to do bitwise ops on a byte?
60227 [forbytext@ya] I can?t seem to find a way to do bitwise ops on a
+ 60243 [lyle@us rs s] provides what you're describing.
+ 60246 [dossy@pa op ] I was just doing bitwise ops last night.  What are you trying
| 60350 [forbytext@ya] This works for simple bit masking operations, but I?m
| 60441 [dossy@pa op ] Why not create your own BitString class?  If you can define
+ 60320 [ysantoso@je ] Perhaps not related to what you are looking for, but I have written a

How to translate this Perl regex
60234 [helmut.leitn] Someone said that Ruby can do anything that Perl does.
+ 60235 [ekarak@so tl] str.gsub /(pat1+)pat2(pat3*)/ { |m| foo(m[1], m[2]) }
+ 60262 [walrus06437@] str = "There are 3*33 bottles of beer on the wall."

attr_ type thingies
60245 [martindemell] Still not 100% clear about the whole metaclass concept. In the following
60247 [decoux@mo lo] instance method
60250 [martindemell] Thanks  - took me a good bit of thinking, but I think I've finally

60253 [waisun.chia@] Happy New Year everybody!!!
+ 60255 [peterwu@ca a] You're the 1st! :)
+ 60265 [Stephan.Kaem] A happy new year to you, too. Over here, time seems to be a little late

Re: Newbie Questions Array
60254 [phlipcpp@ya ] BASIC does the same trick with MID(s$, a, b) = c$. It's by design.

60258 [dlandrith@ma] I'm having two problems extending the array class.

Re: Problems extending Array class
60259 [dlandrith@ma] I just compiled and installed Ruby 1.6.8 from source, and I get the

Re: Probems extending Array
60260 [dave@pr gp o] Super isn't a pointer to the parent class's implementation: it's a call
60284 [dave@la dr t] Thanks!  That fixed my problem.

Newbie: Parse block
60264 [jd204c@NS ni] Can a block be treated as a first-class object, i.e., a collection of

clear understanding of |=
60266 [transami@tr ] i've never seen an exact explination of ||= and i want to be clear about it.
+ 60267 [matt@li ke .] Yes.
+ 60289 [maki@ru yc l] If x is not a variable, they are not equivalent.
  60294 [AntiATField_] (and if foo.@bar was false, bar= would also have been called)

Ruby RPMs
60268 [ian@ca ib n.] I've put together RPMs of the latest versions of Ruby: 1.6.8,

State of FreeRide
60269 [dcarrera@ma ] How close to stable is FreeRide supposed to be.
60282 [rich@in oe h] Alpha is right...but it provides a solid basis for moving quickly
60286 [dcarrera@ma ] I look forward to it.

Ruby in The Perl Review
60274 [jzakiya@ma l] I don't know if this was posted before,

lstripped here-document (Re: comments and continuing strings on the next line)
60279 [nobu.nokada@] A happy new year,
+ 60281 [gsinclair@so] My comment: it's very nice!
+ 60292 [matt@li ke .] I like this, though my biggest problem with << is that the
  60300 [gsinclair@so] I (try to) maintain the indent file for Vim, and here-docs are an

60287 [transami@tr ] Can any one tell me if a call to DBI::DatabaseHandle#columns actually queries
60290 [gsinclair@so] The source indicates that this is the case for the Oracle driver.  I
60291 [transami@tr ] thanks much Gavin!
60299 [gsinclair@so] No correction necesary.

FreeRIDE packages for Debian: update
60301 [batsman.geo@] I've created another package named freeride-cvs. It contains a snapshot

FreeRIDE hangs when I use gets
60304 [sothoth@er s] I'm starting with FreeRIDE. I think it's an excellent project, and I
60307 [rich@in oe h] Yeah...there is a problem with gets input.  Right now the script_runner

Ruby DBI
60305 [dave@la dr t] Is there any way to retrieve the table and database associated with
60306 [transami@tr ] i have not seen a way, but i wonder how you got the resultset without first
60309 [dlandrith@ma] First, if you create objects corresponding to tables in your database,
60323 [gsinclair@so] This sounds really good.  Has anyone really *really* clever
+ 60326 [transami@tr ] Well, i did just extend DBI myself with a class Meta, don't see any reason
+ 60353 [maksa@se am ] Microsoft ADO.NET has something to this, as a so called "disconnected
| + 60359 [peterwu@ca a] It is known as DataSet. However, in legacy ADO, there is also
| + 60360 [transami@tr ] speaking of Ruby DBI, does anyone know if there is a limitation to the size of
|   60361 [gsinclair@so] I doubt if that SQL will actually work, since it is many statements,
|   + 60362 [transami@tr ] gavin, i'll take that bet! :-)
|   | 60363 [gsinclair@so] I definitely think they're more efficient *in some DBs*.  In Oracle,
|   | 60375 [transami@tr ] gavin, you were quite correct!
|   + 60365 [transami@tr ] well i just droped 1000 sql statements on my database via DBI in one fell
+ 60380 [dave@la dr t] several projects for web driven database access (buffered result sets
  60382 [gsinclair@so] I'd very much like to see the code if you're willing to share it,
  + 60396 [mike.campbel] off
  + 60448 [transami@tr ] continuing on with the variaous DBI questions, now i'm stuck on a
    + 60450 [gsinclair@so] There is no way to do this portably, AFAIK.
    + 60452 [dsafari@pa a] AFAIK there isn't a database independent way of doing what you want. Scott
    | 60453 [transami@tr ] very interesting read, thanks.
    + 60454 [dlandrith@ma] Let me answer your questions in the reverse order that you asked them
      60457 [transami@tr ] David,

sysread of /dev/video with threads
60312 [pat@ti yl af] Can someone explain why the following code does not work?
60333 [matz@ru y- a] Hmm, probably select(2) does not show "ready" for /dev/video0 for your
+ 60425 [pat@ti yl af] Indeed, the command never completes.  The case is the same for my 2
| 60434 [matz@ru y- a] I'm sorry, I have no idea.
+ 60447 [pat@ti yl af] I fiddled around with the gqcam source code, and added a select(2) call

Re: [ANN] win32_popen 0.1 (should be included in WinRuby)
60313 [ptkwt@sh ll ] Though I don't use Windows much anymore, this is good stuff.

60314 [dwerder@gm .] First of all thx to the makers of this wonderful language!
+ 60315 [dcarrera@ma ] Just out of curiosity, what funny html support?
| 60317 [transami@tr ] are you talking about the cgi.html { cgi.head { ... } + cgi.body { ... }  }
| 60476 [dwerder@gm .] yes, I'm talking about these many nested code blocks...
| + 60504 [daniel@ze ed] I found no real advantage, in fact, it is a real pain in the butt. Several
| + 60508 [wakou@ru y- ] $ cat test
|   60547 [dwerder@gm .] this error is raises because the html4 specs dont include the center tag anymore...
|   60808 [wakou@ru y- ] Yes. It's one of answer for question.
+ 60316 [ljz@as as .c] I can't speak specifically about ruby's cgi lib because I haven't used
  60318 [transami@tr ] i'll agree with two notes: the CGI lib is still needed for forms processing
  60366 [    s@xs .d ] def xml(element, attributes = {})

FXRuby/FOX reference?
60321 [russ@fr es f] ...
+ 60322 [rich@li hi o] Starting some FXRuby in anger??
| 60324 [russ@fr es f] Er, it?s an English saying. I'm not really angry - how could anyone be
+ 60387 [lyle@us rs s] Anger?
  60411 [probertm@ac ] Non-NA English for "seriously".  So possible trans: "just starting
  + 60414 [wyzzrd@be ls] FWIW
  | 60423 [lyle@us rs s] This will also a good candidate for the movie title when FXRuby makes
  + 60571 [hal9000@hy e] Very interesting, that's something I've never

Compiled Ruby executables
60327 [pmak@aa ni e] Is it possible to substantially increase Ruby's execution speed by
+ 60331 [nobu.nokada@] There were rb2c (ruby to C translator) and rbjit (ruby JIT),
| 60412 [ndrsbngtssn@] Jython actually has a bytecode compiler available.
| 60451 [sdate@kc rr ] Mean while, Matz is working on his little secret compiler ([57771],[58028])
+ 60341 [dcarrera@ma ] Execution speed will not be increased very much by this method.

hope to cooperate with you in the near future!
60328 [info@va at o] charset="ISO-8859-1";

Eiffel v.s. Ruby?
60329 [pmak@aa ni e] I am a programmer who likes to learn new languages once in a while, if

javacrap, i mean javascript
60330 [transami@tr ] a bit OT but,
60335 [wyzzrd@be ls] document.forms[0].elements["aname"].value = "text2"
+ 60338 [transami@tr ] thanks, i realized i would have to resort to something like this soon after i
| 60685 [drbrain@se m] into=20
+ 60351 [idan@id ns .] W3C DOM has no innerHTML as far as I understand, it is MS invention used
  60355 [transami@tr ] yes, i read that in my javacrap tomb, but it don't work in mozilla, innerHTML
  60356 [idan@id ns .] Mozilla has a compatiblity layer to IE DOM, However, It works well

Is there any  mod_ruby/eruby for Windoze XP?
60332 [usenets@ny .] I've been looking/searching and can't find any. Thanks.
60342 [dcarrera@ma ] My guess is that if you're running Apache and you can compile it, then you
60349 [usenets@ny .] Anyone has Windows XP binary distribution for the latest working version?
60408 [dcarrera@ma ] It is customary to make some effort to solve your problem before you
60416 [tarasis@bt p] If its something that you can attepmt a partial solution on. He simply
60422 [dcarrera@ma ] I meant to be informative.  If I came accross as rude, I offer my
60427 [tarasis@bt p] I must apologize myself Daniel I was a touch harsher than I meant to be

How to extend Hash
60337 [zhoujing@co ] I am trying to extend the Hash class so that I can "Insert the content
60340 [matz@ru y- a] It is possible, just like other Ruby-defined classes.  But first you
60369 [zhoujing@co ] Thanks. Yes. That is exactly what I wanted.
60370 [decoux@mo lo] pigeon% cat b.rb

Is there any way of excluding classes and methods from RDoc?
60343 [ tom@u2 .c m] Subject says it really.
60344 [dave@pr gp o] ...

ErrorDocument/CGI error code determination
60347 [bsl04@co p. ] Can a Ruby CGI program configured to be the ErrorDocument for 404

Ruby in Linux Gazette
60348 [ptkwt@sh ll ] Apparently Linux Gazette has been running a series of tutorial articles on
60352 [martindemell] Not too clearly written, sadly. For instance

Re: [OT] javacrap, i mean javascript
60357 [daniel@ze ed] Actually, Javascript is a pretty cool language. It has many OO features
60358 [transami@tr ] true true. javascript still pales to ruby, but, yes, the DOM is really the

60364 [matthias_vei] Happy new year!
60377 [matz@ru y- a] Hmm, this is a good chance to reconsider about hooks.  Currently we

Interfaces in Ruby
60378 [bob.news@gm ] i'm currently getting to know ruby.  i like all that i have seen so far and
+ 60379 [gsinclair@so] The latter is the approach I took on my most recent Ruby project.  I
+ 60399 [pbrannan@at ] Make sure whatever mechanism you use is a module and not a class.  Ruby
  60463 [bob.news@gm ] thanks a lot for those remarks and pointers!

Q: RAA source archives? (404s)
60383 [mike@os n. r] how people tend to solve "404 problem" with RAA entries?
60392 [lyle@us rs s] Have you tried sending e-mail directly to the author (Eli Green)?
60403 [mike@os n. r] Hmm... no.  But it's not the first time I get 404, and inspecting

Are we even getting close?
60385 [ted@da ac mm] 1 #!/usr/bin/env ruby
60386 [decoux@mo lo] Why do you need 3 blocks 'begin ... rescue' ? One is suffisant : the error
60390 [ted@da ac mm] Now we're getting somewhere!
+ 60406 [nemo@he lo r] Now we're getting somewhere!
+ 60459 [dali@in ul .] res.each { |row|
  60461 [ted@py hi n.] Thank you.  I've received so many helpful replies -- each from a different

Compatibility (was Class.inherited)
60388 [dave@pr gp o] This raises a somewhat bigger question.
+ 60397 [pbrannan@at ] I like that idea.
+ 60398 [matz@ru y- a] Your worry is understandable.  Unofortunately <g>, the wider Ruby
| + 60400 [decoux@mo lo] Why it don't exist the equivalent of #inherited for #extend ?
| | 60404 [matz@ru y- a] I couldn't think of any good usage of it.  Probably "extended"?
| + 60407 [matthias_vei] ... that would be great!
+ 60401 [transami@tr ] whatever happened to the idea of a compatability module? i.e. by requiring a
| 60402 [matz@ru y- a] We have 'shim' module which does completely opposite.  By using that
+ 60426 [ptkwt@sh ll ] And, if changes must be made that break code perhaps we should offer
  60687 [drbrain@se m] Here's one that goes the other way...

FXRuby.FOX (ot?)
60389 [russ@fr es f] ...

State of Ruby Web Application Frameworks
60391 [jason@jv eg ] I've just finished a project that was developed using JavaServer Pages,
60456 [tnakajima@br] I'm a developer of a WEB-related library, named 'amrita' and always
+ 60474 [ahoward@fs .] i'm no web expert, but of all the cgi related web packages i've looked into,
+ 60513 [jason@jv eg ] Thanks for this information, Taku.  I've subscribed to the mailing list

Reference to a class's superclass
60393 [dlandrith@ma] How do I obtain a reference to a classes superclass within a class so
+ 60394 [decoux@mo lo] alias ?
+ 60405 [matt@li ke .] Yes you must alias the original method to a different name before you

Numerical Ruby
60395 [gmiller@bi t] Can someone please point me to the most relevant page regarding the use

How to call overridden methods (finally!)
60410 [nemo@he lo r] I thought I had come up with a clever way to call a method which has been
+ 60417 [pbrannan@at ] See [ruby-talk:38180].
| 60435 [nemo@he lo r] <ruby-talk:38180>
| + 60462 [decoux@mo lo] This is a stupid example, but with your modified version of ruby try
| | 60478 [nemo@he lo r] This is a stupid example, but with your modified version of ruby try
| | 60479 [decoux@mo lo] pigeon% cat b.rb
| | 60482 [nemo@he lo r] pigeon% cat b.rb
| | 60485 [decoux@mo lo] How do you make the #bind in this case ?
| + 60491 [matz@ru y- a] Most of C implemented methods does not type check their receivers, so
+ 60437 [nemo@he lo r] Actually, here's another way to call the "super" of a method, but it's less

fxscintilla problems finding fox lib on Solaris
60413 [djberge@qw s] Solaris 9

60415 [coma_killen@] Is there some easy way to rename directories from Ruby code?
+ 60418 [djberge@qw s] Keeping in mind that a dir is just a file...
| 60419 [feldt@ce ch ] or even
| 60420 [djberge@qw s] D'oh!  Thinking too much in *nix, I guess. :)
+ 60421 [cyclists@nc ] File.rename(old, new)
  60424 [usenets@ny .] how about batch rename using regex?
  60429 [cyclists@nc ] Hmmm...I think you'd want to loop over the parent directory and rename

does exist something like Method.info ?
60428 [surrender_it] I was playing a little with socket stuff, and trying to learn what
60439 [matz@ru y- a] It makes the interpreter bigger.  I think it should be a separate
60507 [surrender_it] it seems a good reason to me and even a good solution.
60510 [dave@th ma e] That's the eventual goal, but it'll take a while...

[BUG?] Tempfile
60430 [ oct@zo .o g] it seems that using tempfile.rb (ruby 1.7.3 from PragProg installer)
60440 [matz@ru y- a] How about calling "binmode" to the tempfile object?
60460 [ oct@zo .o g] Thanks a lot !

Hiding block parameter from super method
60431 [sangamon@t- ] sorry if this is too much of a FAQ, but I couldn't find a quick
60432 [vjoel@PA H. ] Easy...
60438 [sangamon@t- ] Duh! So I've been tackled by the principle of least surprise once

[ANN] ratlast 0.3
60433 [probertm@no ] Rubyists,

sort the hash keys
60442 [zhoujing@co ] How can I sort the keys of a Hash so that they can be outputed
60443 [gsinclair@so] A Hash is explicitly a non-sorted data structure.  If you just want
60444 [probertm@no ] You can also use hash.sort directly, however, be careful.  It returns
60445 [gsinclair@so] hash_a.each do |key, value|
+ 60446 [dcarrera@ma ] hash.keys.sort.each do |key|
+ 60467 [probertm@no ] My mistake.  That should have been
  60468 [decoux@mo lo] I don't understand, sorry, but Hash#sort will use the block to sort the
  60488 [probertm@no ] (I have to stop sprouting when I am sick .. :-( )

Source code formatter for Ruby?
60469 [Peter.Booth@] Does anyone know of a source code formatter for Ruby?
60472 [ndrsbngtssn@] I don't know about any free-standing tools. But there
61227 [kentda@st d.] As for free-standing tools, I've used rb2html previously. It isn't as
61322 [gsinclair@so] I'm soon to play with this, but want to call it programmatically,
61327 [kentda@st d.] I tinkered somewhat with it, but mostly for cosmetic reasons. I needed

toplevel modules and classes
60470 [Eugene.Scrip] How do I get all defined toplevel modules and classes?
+ 60471 [decoux@mo lo] Object.constants don't do what you want ?
| 60475 [Eugene.Scrip] list = []
+ 60473 [matz@ru y- a] ruby -e 'Object.constants.each{|c| c = Object.const_get(c); p c if c.kind_of?(Module)}'
  + 60477 [Eugene.Scrip] Oops, didn't see this message. Please ignore my previous one.
  + 60481 [Eugene.Scrip] OK, another question. Module#constants return constants accessible
    60484 [decoux@mo lo] no, no you don't have the same output
    60490 [Eugene.Scrip] Oh, sorry. I've tested on some standard classes and they actually
    + 60492 [decoux@mo lo] When you call Class#constants (or Module#constants) ruby look in the
    | 60493 [decoux@mo lo] Well, except if you include another module in this module
    + 60505 [chr_news@gm ] There is instance_method and a singleton_method (class_method)