181316-189046 subjects 181791-193308

^ [SOLUTION] Current Temperature (#68)
181600 [dev.random g] Here is my solution, actually it's my first ruby program, I just
+ 181604 [adityam umic] This quiz finally got me going to read Ruby's Net API. It turned out
+ 181607 [chneukirchen] $-w = nil  should work.
  181611 [dev.random g] Yay, that works, no warnings anymore :) Where can I read more about this magic

^ Scope of constants in instance_eval
181602 [gavin refine] I'm writing a DSL, and I want to use some constants. To be clean, I
+ 181612 [jimfreeze gm] charset=US-ASCII;
| 181614 [gavin refine] Hrm? Not on my machine.
| 181618 [jimfreeze gm] def initialize(str)
| 181623 [gavin refine] Evaling as a string works. (Constant is resolved.)
| 181640 [g_ogata optu] But only in 1.9, if I understand you correctly.
| 181642 [g_ogata optu] Sorry, I see this follows on from Jim's post.
+ 181616 [gavin refine] For those interested in doing the same, I've hacked up a quick method
+ 181639 [none none.ne] Just a constant lookup issue for a closure. Doing
+ 181646 [matz ruby-la] In 1.8, constant uses lexical look-up, even within the block given to

^ ANN: next meeting of codefesters in Columbia Maryland is Monday Feb 27th at 7pm
181603 [jeffwaltzer ] Us folk who have been teaching ourselves Ruby on Rails development in

^ Re: Current Temperature (#68) [QUIZ][SOLUTION]
181609 [horndude77 g] My solution uses yahoo weather like another of the solutions here. It's
181754 [gthiesfeld s] Jay,
181794 [horndude77 g] Cool. I'd tried to do something like that, but couldn't quite get it to

^ Re: [solution] Current Temperature (#68)
181610 [gthiesfeld s] This is my first submission to rubyquiz.  I've been learning ruby for
+ 181619 [leavengood g] I think this is pretty darn slick Gordon, and you should continue in
+ 181620 [steve waits.] As Ryan said, excellent job!  Keep at it.
  181622 [jeff blue-gi] This is also my first Ruby Quiz submission.

^ ruby vtk bindings
181621 [horndude77 g] I'm wanting to use ruby with VTK (http://public.kitware.com/VTK/).
+ 181654 [gmurray clou] The ruby-vtk works with VTK-4.4 but not VTK-5.0+
| 181655 [horndude77 g] Hmm... vtk-4.4 seems to be the default for ubuntu. Following the
| 181663 [gmurray clou] I used the tcl8.4.11 and tk8.4.11 src, which put all the headers in
+ 181658 [nagai ai.kyu] Although I know this is NOT an answer which you want,

^ [ANN] Uttk 0.3 is released!
181624 [nicolas.desp] We are proud to announce that the version 0.3 of Uttk, aka KID, is
181626 [nicolas.desp] Yes, you're right. Actually, I copy-paste the Rubyforge news...

^ Re: Uttk 0.3 is released!
181625 [none none.ne] Could you briefly describe what Uttk is? :)

^ Thinking out of the box
181627 [tsumeruby ts] Time to get out of my little Linux/BSD/win2k3 comfort zone and make
181659 [nagai ai.kyu] There is a known bug on MacOS X + Tcl/Tk Aqua Framework.
181668 [tsumeruby ts] Has there bug a patch committed in CVS which fixes this bug?
181671 [tsumeruby ts] Let me try again...
181676 [nagai ai.kyu] I don't know how to fix the problem.
181678 [tsumeruby ts] I've access to 2 powerbooks. Can the bug be reproduced?
181701 [nagai ai.kyu] I got a report that Ruby/Tk-Widget-Demo's "Message boxes" demo
182521 [tsumeruby ts] I understand. Here is the summary of what my results of the widget

^ rdoc bug
181631 [jesusrubsyou] $ ruby --version
181672 [ocean m2.ccs] It seems that rdoc should not treat \ as escape character
+ 181680 [ocean m2.ccs] I have tested. I found some difference between before and after applied my patch
+ 181696 [ocean m2.ccs] Sorry, I'll cancel this patch. Mr. Ishizuka (Author of irb) pointed
  181867 [ocean m2.ccs] This bug was fixed by Mr. Ishizuka. Thank you for report.

^ Using attr_writer?
181632 [joe yahoo.co] class Foo
+ 181633 [none none.ne] This is perfectly valid. If this is not your actual code,
+ 181634 [lopexx autog] puts returns nil
+ 181636 [huw DELTHISB] Curious. I just copied, pasted and ran your code. It produces the string
  181637 [jeff blue-gi] Are you running it in irb?  As someone else mentioned.. you'll get a
  181638 [joe yahoo.co] Turns out I had a bug elsewhere in my code and it does in fact work as

^ RubyCocoa and DarwinPorts Ruby?
181635 [info johnale] Can anyone point me to potential problems with setting up a RubyCocoa
181650 [jeem hugheso] The easy way is to install RubyCocoa from DarwinPorts as well.  The
181656 [info johnale] Jim,
+ 181817 [jp-www dcs.g] There's a file called PortIndex that contains the summaries of all the
+ 181855 [jeem hugheso] The /Developer stuff will still go to /Developer.  XCode seems happy

^ Re: Capitalized method names (was: Inconsistent ... Integer/Float)
181649 [dharple gene] I also find using a capatilized method name very odd and

^ WxRuby widget borders
181653 [r.mark.volkm] I can add a border around widgets in WxRuby using the ALL flag, but

^ Authenticating distributed Ruby
181662 [trejkaz gmai] I've been playing with DRb a fair bit lately, am planning to use it as
+ 181686 [ruby anthrop] } Of course, DRb in itself provides no real security.  But because of the
| 181715 [zhengyi anar] For specifically doing DRb over SSL, with client cert-based auth, this
+ 181749 [x versatechs] If your communications is of the (essentially) non-connected variety,
  181763 [trejkaz gmai] Well, this depends on how you look at HTTP.
  181768 [drbrain segm] You'll have bigger problems than authentication if you want to have

^ Undefined Method
181664 [4ied comcast] After messing around with PHP for over a year, I took one look at Ruby
181666 [steve waits.] Thanks for your message about Ruby on Rails.  I think you'll find

^ extending an object
181665 [gerardo.sant] I'm writing an extension for Ruby, and want to extend an object with
181682 [rossrt rosco] I think rb_extend_object retains the original access of module instance
181783 [gerardo.sant] Thanks Ross, it's solved. For the record, I was using

^ Ruby Whitespace Semantics
181667 [almann.goo g] irb(main):001:0> a = ( 4 + 5 )
+ 181669 [hal9000 hype] I understand your concern. Let me try to clarify.
| + 181674 [almann.goo g] Thanks, the semantic is clearer now even though I think it is very
| | 181721 [avdi.grimm g] It is generally good coding style in any programming language, when
| | 181738 [aderobertis ] Well, when I work in languages other than Ruby (not in ruby, of course,
| | + 181741 [rmagick gmai] You're not alone. I've adopted this practice in C programs ever since I
| | + 181742 [mental rydia] It works fine in Ruby if you use a backslash to continue the
| | + 181757 [Ephaeton gmx] If this is M(atlab) then the three dots serve to signal
| |   181866 [aderobertis ] No, that's pseudo-code and the three dots are an ellipsis indicating
| |   181876 [Ephaeton gmx] *snore* Sorry :)
| + 181732 [mark mwilden] But (4 is clearly an incomplete statement.
|   181733 [lukfugl gmai] Actually, notice the semicolon. What Hal is demonstrating is that a
|   181753 [mark mwilden] Ah. I thought a semicolon terminated a statement.
|   + 181755 [mental rydia] It does; it's just that the current Ruby grammar permits multiple
|   | 181786 [mark mwilden] I guess a = ( 4 ; + 5 ) is not so different from C's a = ( 4 , + 5 )
|   + 181756 [interfecus g] It does. 4 is a valid statement in Ruby. Ruby doesn't have the same
|     181758 [mental rydia] Well... not really.  There's the same distinction in Ruby too (see
+ 181670 [kevin.jackso] I'm no expert, but I think it has to do with both first and third having
+ 181681 [alexandru gl] and probably in other placess too (but I wouldn't know about them as I am
| + 181698 [jim freeze.o] Matz has said that
| | 181714 [mental rydia] Hmm.  What about
| | 181734 [mark mwilden] It should be a syntax error.
| | + 181736 [logancapaldo] charset=US-ASCII;
| | + 181740 [mental rydia] Ruby has an unary +...
| | + 181770 [hal9000 hype] Why/how?
| + 181702 [almann.goo g] This behavior actually isn't well documented, since the semantic is
+ 181711 [mental rydia] a = ( 4 + 5 )

^ Curriculum for Teaching Ruby to C++ Professionals
181673 [steve waits.] I'm a game programmer by profession.  I'm setting up a little "Learn
+ 181675 [kevin.jackso] For me as a newbie to the language - the thing that really got to me was
+ 181677 [tsumeruby ts] Ruby is dual licensed.
| 181699 [steve waits.] Oops, thank you Tsume!
| 181718 [tsumeruby ts] If you have any problems embedding Ruby in any program, we would be glad
+ 181679 [dave burt.id] If they can have laptops, and be networked (802.11?) you can use DRb to
| 181793 [steve waits.] Thanks to both Dave and Kev for the advice!
+ 181694 [ruby anthrop] } Hi Rubyists,

^ Ruby/Tk: How to access surrounding class from Tk Callback?
181685 [u235321044 s] Assume that I'm modelling a visible form, consisting of entry fields,
181700 [nagai ai.kyu] It may be a FAQ.
181984 [u235321044 s] Arigatou gozaimasu! But where can I find the FAQ? I was able to
+ 181986 [u235321044 s] I think, I figured this out by myself: Instead of setting
+ 183086 [nagai ai.kyu] I want to compose Ruby/Tk manuals/documents.

^ Re: ruby-oci8 0.1.14
181688 [keltia gmail] Same from here.  I'm using it regularely on several machines (Solaris
+ 181765 [steven lumos] And here.  Also on Solaris and OSX, Oracle 10g.  I even use it with
+ 188345 [tom.styles n] Has anyone managed to get the library to work with AIX, I've managed to

^ Ruby path for SVN log XML -> HTML
181689 [Bil.Kleb NAS] So what's the Ruby way to go from
181824 [kou cozmixng] In <dtuulo$1rg$1@vilya.larc.nasa.gov>
+ 181911 [Bil.Kleb NAS] Awesome, thanks.
+ 182087 [Bil.Kleb NAS] you use it as part of your post-commit hook?
  182204 [kou cozmixng] In <du4qkv$gi2$1@vilya.larc.nasa.gov>
  182235 [Bil.Kleb NAS] Excellent, the world will thank you.
  182239 [kou cozmixng] * https://svn.collab.net/repos/svn/trunk/tools/examples/svnlook.rb

^ string contains one of these???
181690 [mikkel helen] Imagine,
+ 181691 [james graypr] => ["1D", "2D", "U16", "U19", "LR", "RR", "JNL", "NL"]
+ 181692 [shortcutter ] => ["1D", "2D", "U16", "U19", "LR", "RR", "JNL", "NL"]
| 181703 [chneukirchen] irb(main):002:0>  "some stuff NL is chunky".scan Regexp.union(*leagues)
| 181726 [bob.news gmx] Even better!  Didn't know about that method.  Learn something new every
| 181748 [devlists-rub] amazing...
+ 181693 [dharple gene] leagues = %w{1D 2D U16 U19 LR RR JNL NL}
+ 181792 [hitesh.jasan] You've got a bunch of great answers already, but here's another option.
  181809 [johan.veenst] And the winner is ...
  181832 [hitesh.jasan] Actually if you flip it around as 'leagues & words.split' it turns out
  + 181884 [jeff schwabc] Is it possible that link is incorrect?
  | 181908 [hitesh.jasan] Jeffrey, the link should be working for you now.  My hosting provider
  + 181937 [chneukirchen] You'd better cache those Regexps.
  | 181962 [hitesh.jasan] Good comments Christian.  I thought I'd just hack a set of tests and
  | 182025 [james graypr] suggestion@rubyquiz.com
  + 182048 [jeff schwabc] I am surprised by the scan failures ("could not continue test").  Do you
    182068 [chneukirchen] irb(main):002:0> Regexp.new "x"*600_000

^ Commit emails for RubyForge Subversion projects
181695 [tom infoethe] Commit emails are now available for folks with RubyForge projects that
181719 [tsumeruby ts] Do you support CIA?
181737 [tom infoethe] 006/02/commit_emails_a.h

^ Spacing issues when using Inferior-Ruby Emacs mode
181707 [joshstaiger ] I'm seeing some rather strange behavior when using Inferior-Ruby-Mode in

^ Re: Current Temperature (#68)
181709 [semmons99 gm] # Author: Shane Emmons
181708 [semmons99 gm] ** Sorry had my test code still in there for my location
181716 [james graypr] I was just giving you a hard time, but that's so much for making the

^ Dynamic stuff and books
181710 [riko despamm] I started using ruby a couple of weeks ago and it's time to make a couple
181722 [rossrt rosco] I'll skip to the bits I might be able to help with :)
181752 [riko despamm] It's the reason why i put the index. I supposed many people would have
181764 [rossrt rosco] Answering a later question you had, the above singleton method could be
+ 181815 [riko despamm] Quite interesting. I understand its semantic, but not its syntax. That is
| 181828 [rossrt rosco] 'class' here is doing what you expect it to do - defining a class. But
| + 181942 [logancapaldo] charset=US-ASCII;
| + 182006 [riko despamm] Ok. Quite got it. It's kind of a new viewpoint to me. In fact it can be
|   + 182011 [rossrt rosco] In terms of the implementation, it would seem so (thanks, Logan), and
|   | 182117 [riko despamm] Ok. That's pretty much the same advise I give when someone asks me the same
|   + 182120 [logancapaldo] charset=US-ASCII;
|     182142 [riko despamm] We were discussing about another syntax to reopen the class.
|     182153 [logancapaldo] charset=US-ASCII;
+ 181827 [riko despamm] Quite interesting. I understand its semantic, but not its syntax. That is

^ empty field ( check form )
181724 [michaelaugus] is there some function to check a form on empty fields or  check the

^ Plugin type discovery/registration - How do I discover what classes were loaded when I dynamically require in ruby files from a directory?
181725 [jeff.barczew] In my current project I am in need of a standard plugin mechanism where I
+ 181727 [james graypr] Hope that helps.
| 181729 [gene.tani gm] this is relevant too, I think
+ 181735 [vjoel path.b] Kernel#module_eval is a good tool for wrapping up plug-ins inside a new
  181750 [jeff.barczew] Thanks for the quick responses and wonderful suggestions, these are great! =

^ Confused about "private"??
181743 [info johnale] I have a confusion in Ruby's way of dealing with "private" instance methods.
181744 [dblack wobbl] Private methods cannot be called with an explicit receiver, and "self"

^ [SOLUTION] Current Temperature (#68)
181751 [email55555 g] require 'uri'

^ tar with ruby
181759 [tomas_fische] I have started using ruby.
181766 [drbrain segm] I tend to favor calling external programs when I know they'll be there.
181775 [halostatue g] ...whereas I tend to prefer a pure Ruby approach. I plan on improvingArchive::Tar::Minitar in the near future anyway and have been givensome partial support for symbolic links.

^ DRb and signals
181760 [mental rydia] Using DRb appears to disable signal handlers in Ruby, at least in
181767 [drbrain segm] $ ruby -v -
181771 [vjoel path.b] Seems ok also with ruby 1.8.4 (2005-12-24) [i686-linux].
181779 [logancapaldo] charset=US-ASCII;
181863 [mental rydia] Hmm, okay, thanks.  I guess it's an HP-UX issue.

^ Is this Ruby warning making sense???
181761 [scriptfan gm] Does anyone think if this the warning makes any sense?
+ 181762 [lopexx autog] Any construction literal (true in this case) will produce such a warning
+ 181785 [rcoder gmail] Writing 'if (foo = "bar")' instead of 'if (foo == "bar")' is a classic
+ 181810 [malteNOSPAM ] Yes, because you are testing an expression (a=true) though it's obvious in

^ [ANN] Ruby-VPI 0.1
181773 [skurapat ucs] Ruby-VPI 0.1 has been released.

^ :-(
181774 [joevandyk gm] Someone needs to make a "C++ for Ruby programmers" book.  I'm getting
+ 181776 [tsumeruby ts] Heres a patch
+ 181777 [ruby anthrop] } Someone needs to make a "C++ for Ruby programmers" book.  I'm getting
| + 181780 [nugend gmail] Just include the Ruby extension binaries and write it using the Ruby C calls!
| + 181900 [joevandyk gm] 1.  Templates (that aren't in the STL) scare me.
| | + 181933 [none none.ne] Does this help?
| | | 181936 [none none.ne] (Insert about eight thousand lines of compilation
| | + 182032 [aderobertis ] #include <iostream>
| | | 182148 [logancapaldo] #include <iostream>
| | + 182049 [jeff schwabc] They shouldn't.  Read C++ Templates by Vandevoorde & Josuttis, and
| + 181923 [ptkwt aracne] Lots and lots of syntax....
+ 181781 [wilsonb gmai] In addition to what the others mentioned, you can also write Ruby code
+ 181857 [doodpants ma] As a professional software engineer, I've used a number of different
+ 181869 [gregory.t.br] As I've been painfully drudging through a C++ & OO Design course, I've
+ 181888 [jeff schwabc] I love the C++ programming language.  I'm not going to compare it to
| 181903 [gregory.t.br] No MINASWAN to protect you over there? :-(
+ 181953 [agorilla gma] Bill Guindon (aka aGorilla)

^ Pine's book "Learning to Program" - Answer?
181787 [wood_yee12 h] "Write a program which asks for a person's favorite number. Have your
+ 181788 [mando.escami] You're close.
| 181790 [jeff blue-gi] Also, I believe  the line that that reads 'num'.to_i return zero as
| 181845 [wood_yee12 h] # Write a program which asks for a person's favorite number. Have your
| 181848 [dblack wobbl] Gregor is using string interpolation, to insert the expression num + 1
+ 181789 [james graypr] There's your problem line.
+ 181808 [gk cutcopy.c] puts "Whats your favourite number?"
+ 181851 [gk cutcopy.c] 1.) if you do a .to_i to num, you dont need to chomp it.
  + 181853 [dblack wobbl] puts "What's you're favorite number?"
  | 181856 [gk cutcopy.c] true ;)
  + 181861 [gk cutcopy.c] num = "1"