167493-168418

167327-168102 subjects 167768-170110

Dynamic finding of missing constants.
167493 [Ola.Bini@ki ] I'm doing some slightly interesting things with Ruby, and I wanted to know
+ 167495 [james@gr yp ] Yep, const_missing().
| 167499 [Ola.Bini@ki ] Ah, sorry. Thanks for the pointer. I thought I checked for it. But
+ 167496 [decoux@mo lo] You have Module#const_missing

Newbie Mixin Problem
167507 [jonathan.ruc] about it I'm attempting to re-write some of my Java code. However I
+ 167509 [hgs@dm .a .u] This suggests that you are trying to call validate on the
+ 167510 [caleb@ae -t ] It looks to me like you're calling validIndex? on Board, and not on an

[QUIZ] Pinewood Derby Chart (#56)
167515 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until

Cross tabulation
167519 [smith@vo ra ] For a little background and comparison, there's an article on O'Reilly

forced extension compilation
167522 [micah@at mi ] Is there a way to force the compilation of any or all native extensions

fxRuby- text on canvas and fonts generating errors
167523 [boxofsoxx-go] I have a ruby program that uses FXRuby. I have created a canvas widget,

'private' gems/gems hierarchy
167524 [danyc@no pa ] Greetings,
+ 167526 [billk@ct .c ] Sorry I can't answer your gems question, but RubyScript2Exe is another
+ 167531 [james_b@ne r] You can specify what URL to use to fetch gems.  For your case, you could
+ 167536 [jim-keyword-] Yes, it is easy to setup a private gem server.  See

Codepage 850 character set
167528 [dsmorey@gm i] Can anybody tell me how to read this information with Ruby?  I
167580 [Nuralanur@ao] ...

What's the difference between require and require_dependency?
167532 [dan.bikle@gm] People,
+ 167538 [flori@ni e. ] require loads a file (shared object or ruby source) once from the load path.
+ 167559 [schoenm@ea t] "require" is standard ruby. "require_dependency" is a Rails extension

[ANN] The Ruby Grammar Project
167537 [mental@ry ia] =3D=3D=3D HELLO?
+ 167539 [daniel.schie] Hell yeah!
+ 167556 [surrender_it] hooray for syntax lawyers!
+ 167573 [chneukirchen] In general, a good idea.  However, can there be made a pure-Ruby
  167596 [mental@ry ia] 1. Is it possible to write a complete grammar for Ruby in ANTLR, given

Fun with ranges!
167542 [sgentle@gm i] So I was messing around today trying to find out whether there was a
167548 [dblack@wo bl] What version of Ruby are you using?
167552 [sgentle@gm i] ruby 1.8.2 (2005-02-01) [i386-mswin32]
167553 [dblack@wo bl] Interesting -- it seems to be a 1.8.2 thing.

forcing STDOUT.sync for scripts
167550 [google@fr yz] I'm trying to figure out a way to force STDOUT to be synchronized when
167557 [dooby@d1 .k ] ruby -rsync myscript.rb
167689 [pesterhazy@g] 1) ship such a module with ruby
+ 167729 [jeff.darklig] ...
+ 167734 [pit@ca it in] another way is use a command line such as
  + 167783 [google@fr yz] This last suggestion would be great, but it doesn't work.  Ruby doesn't
  | 167839 [pit@ca it in] Have you tried the command line I've shown?
  + 167914 [nobuyoshi.na] It'd be better to set $0 too.
    167948 [pit@ca it in] I didn't know you can do this. Thanks for the info! It's very useful for
    168073 [google@fr yz] Pit,

How do two objects communicate?
167551 [anne@wj .h r] one the OOP way, but
167554 [james_b@ne r] One way is to register one or more objects with another object, and have
167634 [dale.martens] Depending on the relationship between the classes, you may want to look
167643 [anne@wj .h r] Thank you so much!
167644 [dblack@wo bl] The Observable module is a rather specialized tool, and not at all at
167657 [anne@wj .h r] Yes, I am aware of the structure.
+ 167659 [edder@tk sp ] Partly, most objects communicate only with objects they create and the
| 167664 [anne@wj .h r] Thank you Edwin van Leeuwen
+ 167672 [bob.news@gm ] Not only: there's no need for C to be present.  A can reference B or vice

How to make a system tray program in Windows?
167555 [sskim.box@gm] ...
+ 167558 [dooby@d1 .k ] This puts a green tick in the SysTray, then changes it to a red minus
| 167575 [twa@po t. om] Very neat.  I found the icons in C:\WINDOWS\SYSTEM32\INETCPL.CPL' though.
| 167581 [dooby@d1 .k ] Ah, thanks.  That may apply to the majority, then.
+ 167569 [leavengood@g] Ryan

Marshal.dump(obj) as String bug?
167565 [hcatlin@gm i] Alright, so I've been scratching my head about this along with some
+ 167566 [dblack@wo bl] Note the \r, which does a carriage return.  Then what follows
| 167667 [hcatlin@gm i] Thanks david, that makes a lot of sense.
+ 167567 [james@gr yp ] I think of Marshal as returning binary data.  In Ruby, we store that

Does RUBY have the equivalent of PERL's formats?
167570 [ joe@vi .n t] Scanning through one of the Ruby books, it appears that the language is
167571 [flori@ni e. ] ...

What branch of (|) RE is match?
167578 [zbl@op ra ai] variant= [ /[abc]/, /[123]/, /[xyz]/ ];
167579 [jeff.darklig] ...

Nubish questions about syntax and gems
167585 [rosco@ro co ] I'm getting on really well with Ruby (I've not enjoyed programming this
+ 167586 [dblack@wo bl] Let me zero in on one of your questions (I'm sure you'll get multiple
| 167587 [rosco@ro co ] David,
+ 167588 [sean.ohalpin] class A
| 167604 [rosco@ro co ] Ahh, I should have known to check Module :) I'm still getting used to
| 167607 [sean.ohalpin] Yes - you'd have to pass it as a regular argument.
| + 167616 [rosco@ro co ] I get the feeling that eval is the more general solution. I'll stick with
| + 167619 [dblack@wo bl] class A
|   + 167631 [sean.ohalpin] Thanks David - that explains it. (Obvious of course now you point it out).
|   + 167636 [rosco@ro co ] That's pretty subtle. Definitely one for the notebook.
|     167637 [dblack@wo bl] Keep in mind too that class variable behavior is due to change in 2.0
+ 167591 [dooby@d1 .k ] class Roo
  167610 [rosco@ro co ] Cheers :) I was missing quite a bit there...

GEM Question On Error Messages
167590 [rblove@ai ma] Am brand new to Ruby. I use Log4Perl in my perl work and wanted a
167649 [kozlov.y@gm ] Code of base.rb

rake + gems + rdoc - broken?
167592 [itsme213@ho ] Gems which previously used to install with rdocs (available via the gems
167594 [langstefan@g] The problem is a combination of rake 0.6.99.2 and nito's Rakefile.
+ 167629 [itsme213@ho ] Thanks a whole bunch, Stefan!
+ 167648 [itsme213@ho ] Well, that certainly helped upto a point. It gets further before it dies

Marshalling problem
167595 [hcatlin@gm i] Ok, I've already posted this once, but that was 10 hours ago and it
167597 [dblack@wo bl] It has shown up, as have some responses.

warning: default `to_a' will be obsolete
167598 [dcorbin@ma h] I'm getting this warning, which I think is new in 1.8.3.
+ 167600 [mrkode@gm il] ...
| 167650 [kozlov.y@gm ] and in the 1.9.0 it is already happens
+ 167602 [chneukirchen] Use [*foo].
  167615 [daniel.schie] That doesn't really look much clearer to me...
  + 167617 [chneukirchen] But it doesn't hurt duck-typing.
  + 167618 [james@gr yp ] Array( foo )
    167624 [transfire@gm] Array[ foo ]
    167658 [markus@st er] foo = [1, 2, 3]

[ANN] Rails and Django Debate
167603 [ng@jo nw on ] Chicago is becoming a great place for Web development with many of the

Fuzzy searching using Ferret and KirbyBase?
167605 [jennyw@da ge] We need to get fuzzy search and full-text search. We're using MySQL as a
167645 [dbalmain.ml@] I don't really think a server is necessary. I guess it really depends

Frappr! map for ruby-lang
167606 [daniel@da ie] Hopefully this can help with locating ruby neighbors as well as
+ 167671 [cyberco@gm i] Great initiative!
+ 167678 [neoneye@gm i] Very interesting.. and cool.
| + 167684 [anatol.pomoz] ...
| | 167693 [chneukirchen] Uh.
| + 167694 [damphyr@fr e] Not exactly cool if it returns "Invalid City" for Barcelona.
|   167731 [hawkman.gelo] ...
|   167732 [damphyr@fr e] It works for 'Barcelona, Barcelona (Spain)'. Only found it because this
+ 167802 [erik@te pn t] Thanks!

[ANN] Not-yet Phoenix.rb
167608 [james_b@ne r] The 2nd meeting of Refresh Phoenix will be held on Tuesday, December 6,

Problem with rails
167609 [printdude196] Just installed Ruby and rails as per onlamp.com
167611 [M.B.Smillie@] Off the top of my head, I would say "firewall?"
167620 [printdude196] Thanks... all I had to do was configure NIS to all for MySQL and the

supporting/emulating updatable views in a ruby orm
167612 [ara.t.howard] i've got a method to emulate updateable views in postgresql which is rather
167737 [pit@ca it in] Ara, I don't have an answer for you, but some more questions. If I

[ANN] Turing 0.0.7 && cry for help
167622 [rubytalk@bo ] Turing is implementation of Captcha (Completely Automated Public Turing-Test
+ 167626 [rubytalk@bo ] Oh well :-/
| 167642 [tom@in oe he] Hm, you may want to do a 0.0.9... I think your gem was built with Ruby
| 167652 [rubytalk@bo ] yeah, it was :-( Is this bug fixed in 1.8.4_preview1 ?
| 167654 [sylvain.joye] You can patch rubygems/builder.rb with
| 167655 [rubytalk@bo ] excellent! Thanks!
| + 167662 [zimba.tm@gm ] I hope your not using
| | 167663 [rubytalk@bo ] Please note: Using this script verbatim is like having no turing challenge
| + 167675 [rosco@ro co ] Amen to that :). I've been hit with this same problem I think, so thanks
|   167677 [langstefan@g] Great! Rant uses this trick now, too.
+ 167709 [tobias.luetk] Great work on the library!
  + 167711 [tsumeruby@ts] Not really. Captchas which work properly are protection from automation bots.
  | 167714 [mental@ry ia] Indeed.  Everybody knows the blind eat old people's medicine for
  + 167735 [rubytalk@bo ] well, I'm aware of this issue ... I just didn't need to solve it right
    167746 [hgs@dm .a .u] I don't quite understand this.
    167754 [rubytalk@bo ] it might be b/c English is not my first language?
    167762 [hgs@dm .a .u] Some consideration of accessibility issues might be a good thing to

[ANN] win32-service 0.5.0
167641 [djberg96@gm ] I'm happy to announce the release of win32-service 0.5.0

Usage of Zlib?
167668 [speechexpert] Can someone show me a code snippet, including require '...' for deflating a
167670 [rubytalk@bo ] require 'zlib'

Question about SOAP and basic auth
167681 [oliver.andri] I am just starting to learn ruby and want to use it to automate some
167683 [oliver.andri] reading the testcode I understood what I did wrong. After I installed

getting character(s) of a string at specified positions.
167685 [theguy0000@g] ...
+ 167686 [rubytalk@bo ] irb(main):001:0> a="How much wood would a wood-chuck chuck if a wood-chuck could chuck wood"
+ 167687 [alex@de et m] myString[4].chr
  167774 [halostatue@g] or

backtick with variables?
167690 [Sardaukary@g] I want to run an external command and capture the output.
167692 [billk@ct .c ] cmd = "net view"

[ANN] RailsConf 2006, June 22-25, Chicago IL
167691 [chadfowler@g] Ruby Central, Inc. is pleased to announce the First International

Nubish 2 - Of require and Ruby CVS
167695 [rosco@ro co ] Thanks for the excellent answers yesterday :) I've been busy again today,

How to read/write an int in binary form to a file?
167696 [speechexpert] Anyone know how to do this?
167697 [cyclists@nc ] Look up the pack method in Array.
167748 [speechexpert] I did - but could see no way to pack a binary string.
+ 167753 [cyclists@nc ] I'm missing something, I think. You don't need to pack a binary string.
+ 167816 [halostatue@g] Can you post an example of what it is that you're trying to do?
+ 167820 [ara.t.howard] irb(main):001:0> byte_string = [0,0,0,42].map{|c| c.chr}.join

Object access heirarchies
167699 [leslie@ca ar] I often have this problem in my projects.
+ 167700 [leslie@ca ar] Ah, one thread up. Perhaps my question has already been answered in the
+ 167702 [daniel.schie] What about a single base class?
| 167776 [anne@wj .h r] I am a newbie on ruby, and I am a bit confused by this code, it seems
| 167785 [daniel.schie] Say you have three classes, A, B, and C, and you want their instances to
| 167812 [leslie@ca ar] Ah, that is so clever.
+ 167704 [vjoel@pa h. ] Modules are typically used not for organizing instances, but for
| 167846 [leslie@ca ar] Thanks a lot for that reply, it's very interesting indeed.
+ 167744 [lyndon.samso] ...
+ 167761 [edder@tk sp ] class Map

floating point subtraction question
167705 [nick@mo il d] % ruby -e 'puts "#{(1.2 - 1.0) == 0.2}"'
+ 167706 [gavin@re in ] irb(main):001:0> 1.2-1.0
+ 167707 [gwtmp01@ma .] The short answer is that decimal floating point literals can not
+ 167708 [jwkenne@at g] This has nothing to do with Ruby, itself, but is a basic characteristic
  167710 [w_a_x_man@ya] BASIC on the 8-bit Atari used binary-coded decimal.

Rails Web Service: Convert Parameter to Class Method Call?
167715 [craigjordanl] I'm trying to write a method for a web service that will find objects
167719 [james_b@ne r] method_missing is your best friend.
167726 [craigjordanl] Thanks for the quick reply. I'm just starting with both Ruby and Rails,
167933 [james_b@ne r] Once method_missing has teased apart the request, you have  few options.
168418 [craigjordanl] This is very helpful. Thank you very much. Not only have you helped me

Case of the missing bytes
167716 [speechexpert] I run Zlib (a compression class) on a string. It outputs a string of bytes
167717 [dblack@wo bl] "a" is going to append, so maybe if you've run your program twice
167749 [speechexpert] As far as appending, I erase the file every time to start again.
167772 [dbalmain.ml@] Don't know if this'll help;
167777 [speechexpert] yes - the "b" did it - I had 2 bugs going and didn't realize that fix

Ruby language dictionary entry
167718 [cfrayda@ro h] I am hoping you would help with a Ruby Language Dictionary (cheat-sheet)

string substitution question
167723 [ljw1001@gm i] and trying to output the results using
+ 167725 [chdiary@gm i] ...
| 167747 [ljw1001@gm i] (eval):1: warning: parenthesize argument(s) for future version
| 167908 [ljz@as as .c] eval(%Q(puts(#{str})))
+ 167739 [rosco@ro co ] (Caveat: relatively new to Ruby)
  167745 [ljw1001@gm i] What is ERB?
  167858 [rosco@ro co ] It is probably possible, maybe using the special quoting operators and so
  + 167860 [rosco@ro co ] By that I mean 'that I know of' - I don't know exactly which versions have
  + 167866 [w_a_x_man@ya] src = "<% stuff.each do |s| %><%= s %> <% end %>"
    167871 [rosco@ro co ] Sorry. I was just going for a more esoteric example to illustrate you can

Re: How to read/write an int in binary form to a file? [THREAD RENAME NOTICE]
167724 [steve@wa ts ] Your message entitled "How to read/write an int in binary form to a
167813 [halostatue@g] Can we *please* have these messages STOPPED?

Re: getopt-1.3.0
167733 [sgbirch@gm i] Now we need to get this into the standard libraries. :-)

htmltokenizer bug?
167741 [hsanson@mo g] I am using htmltokenizer to extract the links of some web pages, my script
+ 167742 [rasputnik@gm] I think most *browsers* would choke on that :)
+ 167757 [daniel.schie] Your HTML isn't valid. Either use the proper entities (< = &lt; and > =
  167766 [hsanson@mo g] Well the problem is that this HTML is not mine, retrieving the pages from the
  168397 [daniel.amela] Sorry for the late reply.
  168410 [james_b@ne r] I recently tried using RubyfulSoup to parse a Web page, and it had some

ANN: Dao Language v.0.9.6-beta is release!
167743 [phoolimin@gm] Dear all,

Pack an arbitrary length string of bytes?
167750 [speechexpert] I need to write and then read a number of bytes to and from a file...
167775 [ruby.brian@g] string = "some junk"
167798 [steve@wa ts ] Your message entitled "Pack an arbitrary length string of bytes?" was

from a file to an array of words
167751 [ngoc@ya oo c] I want to compare two text(html) files. "diff" command in Linux compares
+ 167755 [bob.news@gm ] What is a word in your context?  If you want an array of tokens consisting
+ 167756 [transfire@gm] Not a single but basically,

2dim array/matrix
167752 [wollez@gm .n] I'm quite new to programming as well to ruby. I want to store data in a
+ 167758 [bob.news@gm ] The easiest to achieve that is
+ 167760 [cyclists@nc ] Ruby has a Matrix class in the standard library. Check out "matrix" in
  167767 [wollez@gm .n] Thanks for the answers,
  + 167769 [ruby.brian@g] puts m[1,1]
  + 167770 [bob.news@gm ] You probably misread the documentation.  Did you try
    167773 [decoux@mo lo] Try it :-)
    167779 [bob.news@gm ] "cool" :-)
threads.html
top