169676-175646
169501-171217 subjects 169943-171962
^ rescue anything raised?
169676 [williamerubi] Is there a way to rescue any raised error? Like "rescue *" or
+ 169679 [caleb aei-te] ...
+ 169681 [jeff opendbm] rescue Exception
+ 169689 [williamerubi] Great. Thanks!
+ 169717 [daniel.schie] I actually think that's kinda non-rubyish. Why not simply require
| 169757 [nightphotos ] You can raise any object whose exception method returns an Exception.
+ 169761 [sean.ohalpin] begin
169765 [nightphotos ] I don't think that's correct. Exceptions do form a tree, and rescuing
169767 [sean.ohalpin] You're right. Forgive the brainstorm. :)
169768 [nightphotos ] No problem. It made me take a closer look at the Exception hierarchy
^ Re: Rails RC5 (0.14.4): Next stop one-oh (really, this time!)
169677 [abouihsaan g] having some problems here, I did the following...
^ Re: New guy... Intoduction and first question on some direct
169680 [rakxzo gmail] Thanks for the responses guys... Here's a little more info based on
+ 169711 [akonsu gmail] i would write a parser for these files. represent the contents as a set
| 169732 [rakxzo gmail] Well I do'nt have control over the format of the files...
| + 169735 [rakxzo gmail] If it helps at all... I believe the syntax of the files I'm parsing is
| | 169746 [logancapaldo] Perhaps this is a matter of the right tool for the job. Maybe you
| + 169741 [akonsu gmail] a parser is a big project for a beginner. parsing is a process of
+ 169738 [slitt earthl] If you can count on indentation like you have above, the easy way might be to
| 169874 [martindemell] Very nice piece of software indeed.
| 169878 [slitt earthl] Thanks Martin,
+ 169749 [agorilla gma] How accurate is this example? Just wondering if the mockup has
169766 [rakxzo gmail] Well thats a lot of info so I have to digest on it. I'll post back as
+ 169771 [agorilla gma] Ok, seems I was right about the format. Don't peek if you want to
+ 169782 [slitt earthl] Below my sig is a 45 line program using Node.rb that converts the file into
^ redirect_to shows an empty page
169688 [sayoyo yahoo] I have a little problem with "redirect_to", I use in on a login
169712 [greg.kujawa ] You might have better results posting this to the Rails mailing list at
^ creating Exchange mailBox via Ruby?
169690 [tech.samarit] Howdy!
+ 169703 [tech.samarit] I am looking into ADSI now... wondering if I can do almost the exact
+ 169704 [tanner.burso] Sure it can. Check out the Win32OLE library. It allows you to make all of
169763 [tech.samarit] I have found that I can do all the normal stuff, but interaction with
169901 [tanner.burso] Really the only difference between performing this task in Ruby versus doin=
170490 [tech.samarit] I have the Exchange Management Tools installed, and I can do a little
^ Detecting control-c?
169694 [williamerubi] How does one detect Control-C?
+ 169705 [Daniel.Berge] trap("INT"){ ... }
+ 169710 [joevandyk gm] trap("INT") do
169859 [jim freeze.o] ^Cgot signal INT
+ 169899 [joevandyk gm] Dunno, I didn't get the '^C' text. (on linux)
+ 169910 [gwtmp01 mac.] The ^C is your ctrl-c being echoed by the
^ Help defining multi-dimensional array
169695 [victor.reyes] Ruby Team,
+ 169700 [james graypr] => [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
| + 169706 [victor.reyes] This was quick.
| + 169728 [dandiebolt y] #Third Order Magic Cube
+ 169789 [ara.t.howard] check out narray - i think the functionality of it will help greatly.
170114 [victor.reyes] Thank you all for your help.
^ Subversion support on RubyForge
169698 [tom infoethe] RubyForge now supports Subversion! Yup, at long last, we've got all the
+ 169702 [james graypr] That is WONDERFUL news!
| 169714 [mental rydia] Whoa, awesome.
| 169716 [tom infoethe] Yours,
| 169719 [rmagick gmai] Excuse my ignorance, but what the benefit of switching a project from
| 169729 [tom infoethe] Subversion is sort of the heir apparent to CVS; when you use Subversion
+ 169708 [Daniel.Berge] Huh? Where's the Darcs support you promised?
| 169838 [chneukirchen] I think you just can use rsync to upload your local repositories. At
| 169862 [transfire gm] You can? Could you give more details by chance?
| 169866 [ mfp acm.org] I don't know if Rubyforge actually supports rsync.
+ 169722 [gregory.t.br] How did you know today was my birthday?!?
169724 [tom infoethe] You're quite welcome!
169744 [damphyr free] EXCELENT!! My support request is already in the queue!
169748 [tom infoethe] Heh, fortunately, Curt Hibbs let a few of his projects be the test
^ Not initialized
169723 [ no no.none] The class below seems to do exactly what I want it to do provided
+ 169751 [logancapaldo] def Files.read_file
| 169759 [ no no.none] That's what I needed. Thanks Logan.
+ 169762 [dooby d10.ka] (I saw your acknowledgement to Logan)
169846 [rawde.edward] Thanks daz, it will be useful to figure out exactly how that works.
169928 [dooby d10.ka] Using String % (sprintf)
169959 [rawde.edward] I knew there would be a simple way.
^ Ruby on Rails mailing list?
169745 [chris.irish ] Could someone tell me if rails@lists.rubyonrails.org
169747 [jeff.darklig] I would expect that all of that information is available to you from the
169750 [chris.irish ] Yeah thats where I got that one.... I was just curious if anyone knew of
+ 169753 [ezra yakimah] No that is the only rails mailing list per say. there are some other
| 169754 [chris.irish ] Thanks for the info :)
+ 170090 [mike osdn.or] But why would people need them?
^ YAML question - substitution
169755 [anthony.eliz] { 'a' => 'happy', 'b' => 'happy birthday', 'c' => 'happy new year'}
169775 [drbrain segm] Eric Hodel - drbrain@segment7.net - http://segment7.net
^ Advanced rubycocoa: full-screen applications? (Can I access CoreGraphics calls?)
169758 [bg-rubytalk ] I'm really pushing the RubyCocoa boundaries for a demo I'm trying to
169770 [hisa fobj.co] I'm not bright about QuartsComposer and CoreGraphics, but source code
169786 [bg-rubytalk ] Thanks Hisa,
169796 [hisa fobj.co] Document format of the app is simply plain text. Each page
169873 [bg-rubytalk ] Hmm, I tried saving that text to a .txt file, but TMPresents wouldn't
170268 [kimuraw i.ni] I fixed this problem and published new version.
175244 [bg-rubytalk ] Thanks to your help, I was able to get my application to go full-
+ 175610 [logancapaldo] I've had a very similar sounding problem in a pure Objective-C app.
+ 175646 [groups grand] Aha! Hopefully you will soon have a more complete answer, but I guess
^ Re: XML Transformations using REXML
169776 [gjblomquist ] Gary Blomquist
169812 [steve waits.] And I just received my print issue in the mail today. I'm heading
^ home of the gems?
169778 [railsinator ] I'm trying to understand how gems are loaded. Please help.
169797 [jim weirichh] 'gem env' will give you some information about your gem environment.
169902 [railsinator ] Thanks for getting back to me Jim. Please bear with me as I try to
169915 [jim weirichh] Ok, it looks like you no longer have the system gem repository in your
169918 [railsinator ] I think rails can find the gems. Do you know how rails does it?
169930 [jim weirichh] (1) Rails comes in non-gem versions, is one of those installed?
169936 [railsinator ] Thanks Jim. I'm going to go with your #1. Since this is a debian system, my
^ extend an object using string as module name?
169783 [akonsu gmail] name = 'MyModule'
+ 169790 [ara.t.howard] # creates a class by class name
| 169864 [ mfp acm.org] def klass_stamp(name, *a, &b)
+ 169852 [ross roscope] name = 'MyModule'
+ 169871 [transfire gm] require 'facet/kernel/constant'
169881 [ara.t.howard] we have dueling libraries tom! ;-)
^ How to pass numeric variables by reference?
169791 [ericrchr gma] What's the Ruby way of achieving pass-by-reference for numbers, as in
+ 169794 [rubikitch ru] Array can do it.
+ 169849 [vanek acd.ne] probably assign on callback. In other words, Ruby doesn't have
^ Re: Using an HTTP proxy to record web traffic
169792 [botp delmont] #MouseHole is a scriptable proxy. <http://mousehole.rubyforge.org/>
169813 [mental rydia] ssed? tips pls.
^ Regex: greedy pattern
169793 [basi_lio hot] In the code below, the pattern /#{a}/ consumes more than what I'd
+ 169798 [logancapaldo] /Dr\b/
+ 169800 [dooby d10.ka] You need to escape the dot which is matching any character.
| 169809 [basi_lio hot] It works!
+ 169801 [nobuyoshi.na] It's not caused by greediness. You have to escape Regexp meta
^ Re: [grammarians] do/end vs braces
169807 [mental rydia] Binds to the 2, yes. But then it fails to match, as 2 isn't a method.
^ Unlogical ?
169816 [janchrister.] Hmm, why are these two assertions breaking?
+ 169819 [jeremy bitsw] assert_equal false, true or false
+ 169820 [logancapaldo] charset=US-ASCII;
+ 169821 [ruby ml.icem] '&&' and 'and' have a different level of precedence, as such, the two
169828 [janchrister.] Pickaxe does not list "," in the operator precedence table.
+ 169831 [dooby d10.ka] I don't think it's that.
+ 170024 [gwtmp01 mac.] Because ',' is not an operator. It is an argument separator.
^ Some quick questions
169840 [rosco roscop] I have a couple more questions. Hopefully they're not so dumb this time.
+ 169844 [rosco roscop] Ahh well... This is why I hate asking questions... :P
+ 169853 [slitt earthl] I've only done Ruby for 9 days now, but from the reading I've done, no. It
| 169863 [ross roscope] (I'm a relative newbie too :) And just loving Ruby more and more!)
+ 169858 [james graypr] You could just define both manually.
+ 169867 [rosco roscop] Yes, I suppose at least they're together in the doc then :)
+ 169880 [mreed theree] Don't use attr_accessor, then. attr_accessor doesn't do any magic; it's
169887 [james_b neur] Almost. The rdoc output is different. Using attr_accessor, rdoc does
169892 [rosco roscop] Yup, that's what I mean. I found I could do that, but I didn't notice
^ Weird connection/cache-problem in Rails
169842 [beakid gmail] Does anyone know the solution to this weird problem/bug in Rails?
^ Equation graphing software?
169854 [slitt earthl] Does Ruby have any modules useful in graphing equations like y=x**2+5,
+ 169904 [lavigne.eric] gnuplot does this: http://gnuplot.info/
| + 169945 [slitt earthl] Thanks Eric,
| | + 169952 [dandiebolt y] Yahoo! Shopping
| | + 169956 [blargity gma] Use the GNU Graph utility. It has no problem plotting regions and all kinds
| | + 169960 [dandiebolt y] Octave uses GNU Graphics and it can solve your implicit equations for points.
| | + 169983 [perrin apoth] Are you trying to decide between the two licenses, or are you releasing
| | 170119 [blargity gma] I'm going to release it under a commercially friendly license. Let me know if
| | 170142 [ljw1001 gmai] Generally speaking, I prefer BSD (or Apache) licenses for commercial
| | 170144 [blargity gma] Well, I am a commercial entity, and this will be created for my company, so
| + 170163 [sky.yin gmai] A ruby noob question: If I want to run an external program within ruby code
| 170195 [jqshenker gm] ...
+ 169908 [gdprasad gma] Module providing useful methods for interfacing with a Gnuplot
+ 169938 [pfharlock ya] I might be misuderstanding what you want, but really all you need to do
^ Where has my output gone???
169855 [andrew walro] I run my ruby script, and it produces lots of output
+ 169860 [slitt earthl] Is there any chance that your program is outputting to stderr instead of
| 169865 [andrew walro] root@orac main $ sbin/heretix --bs /home/andrew/prebuild/x86_64/ --cf kdelibs version=none
+ 169877 [bob.news gmx] Did you wait until your script actually terminated? If not, you probably
169889 [andrew walro] Damn. I should have known that.
^ [QUIZ] Kalah (#58)
169857 [james graypr] 1. Please do not post any solutions or spoiler discussion for this quiz until
+ 169907 [adam.shelly ] ## Play the game here...
| 169911 [james graypr] I agree. That looks like a bug.
| 169924 [kero chello.] You want bugs? There's bttom or bottm somewhere in the code.
| 169932 [agorilla gma] def winner
| 169946 [james graypr] Ah yes. That's another one. Thanks you two.
| 169970 [steve waits.] Is there a place where we can easily grab the most recent version?
| 169978 [james graypr] James Edward Gray II
| 170018 [dbalmain.ml ] Could we add this enhancement. It makes searching a lot easier.
| 170022 [james graypr] I'm pretty sure I did what you wanted. Double check me please.
| 170023 [dbalmain.ml ] Perfect. Thanks. Sorry I wasn't very clear. :)
+ 170047 [jannis harde] I think one should use symbols (:top :bottom) instead
170055 [james graypr] While that probably is more Rubyish, let's try to avoid style-only
^ Calling "Signal" from a C module
169868 [caleb aei-te] If I'm writing a C extension, how would I go about calling "Signal.list" from
169869 [decoux moulo] VALUE xx_mSignal;
169870 [caleb aei-te] Thanks a bunch!
^ Multipackage Gems
169875 [transfire gm] workspace/
169897 [jim weirichh] Your gem spec allows you to enumerate the files you want included in the
169914 [transfire gm] Oh yea! :-) I was over complicating the situation. Silly me.
169935 [transfire gm] Wait a minute! That doesn't work.
+ 169941 [jim weirichh] You tell the gem spec where your library directories are (the default is
| 169985 [transfire gm] Well, I got it to work using the require_paths (I assume that's what
+ 169999 [halostatue g] No, but there should be. If you look at my Rakefile for PDF::Writer
^ WWW:Mechanize history
169879 [narf968 gmai] Anyone know if there is a way to tell mechanize not to save a history?
169882 [narf968 gmai] Ok, that was easy.
^ Log file analyzer
169885 [michael.ulm ] I want to analyze a log file using ruby. What is
+ 169898 [bob.news gmx] If data is appended to a single file all the time remember the last seek
+ 169961 [zdennis mkte] The grandrapids.rb is working on Logz, a web application built with ruby on rails which allows you
+ 169991 [gene.tani gm] Comment, since I don't have an answer for you: this is very
^ RWB: call for feedback|developers
169891 [pat.eyler gm] _What is RWB_
^ Ruby for small devices ?
169900 [zimba.tm gma] I would like to know if anyone has experience with embedding ruby insmall devices and if such project exists ?
+ 169912 [wilsonb gmai] The stuff you're interested in starts around page 18, I'd say.
| + 169950 [kero chello.] Good stuff.
| | 170054 [zimba.tm gma] Ok, thanks a lot ppl :-)
| | + 170085 [matthew.hivn] Ruby works great on my Zaurus SL-C3100.
| | + 170211 [kero chello.] Sorry, that should be
| + 170221 [ilmari.heikk] def unlock return unless @locked Thread.critical = true- @locked = false begin t = @waiting.shift+ @locked = t # if there is a waiting thread, keep the mutex locked t.wakeup if t rescue ThreadError retry end Thread.critical = false# if @locked is false, a thread entering #lock sets Thread.critical=true here,# checks for @locked, sees that it's false, and jumps the queue begin t.run if t rescue ThreadError end self end
| 170223 [ilmari.heikk] while (Thread.critical = true; @locked and @locked != Thread.current)
+ 170087 [igouy yahoo.] This is about Smalltalk on small devices, not Ruby, but it may be of
170212 [rasputnik gm] I just discovered Scratchbox (http://scratchbox.org) and its awesome for
^ Article on Ruby at Apress Blog
169903 [pat.eyler gm] Nice little blog entry about getting started with Ruby and Fitness, by Cory Foy
^ new to Ruby - pls help in translating this
169913 [sam.dela.cru] I'm starting to use Ruby in one of my projects at work. I'm coming from a
+ 169916 [james graypr] seen = Hash.new(0)
+ 169919 [dandiebolt y] h=Hash.new(0)
+ 169920 [m.fellinger ] charset="utf-8"
+ 169921 [logancapaldo] hash = Hash.new { |h, k| h[k] = 0 }
| + 169923 [mrkode gmail] well, there is the succ method. and there's a succ! on String, which could
| | 169940 [logancapaldo] charset=US-ASCII;
| | 169958 [m.fellinger ] charset="utf-8"
| + 169925 [dandiebolt y] There is something very fundamental about what you are saying here but I don't quite understand. Could you elaborate on this with perhaps an example?
| 169939 [logancapaldo] Well basically, all variables in ruby are references (or pointers,
+ 169922 [pat.eyler gm] [elided perl goo]
| 169927 [drbrain segm] Ditto. I often find that I can make my code close to readable
| + 169933 [SimonKroeger] Thanks, this is how ruby should look like!
| | 169937 [dblack wobbl] This message is in MIME format. The first part should be readable text,
| | 169968 [SimonKroeger] yes, saw that after pressing the submit button, but as said before
| | 172863 [dblack wobbl] This message is in MIME format. The first part should be readable text,
| + 169942 [sam.dela.cru] Thank you all. I learned a little bit more ruby. And yes, I want to do
| | + 169948 [james graypr] ARGF.each do |line|
| | | 169987 [mental rydia] Ah, thank you. I couldn't remember how to do that. That's closer
| | + 169949 [mental rydia] One caution here -- if you want the file handle to be closed when
| | + 169951 [sam.dela.cru] Yes, file handles must be closed. I learned that the hard way on one of
| | + 169954 [james graypr] File.foreach(ARGV.first) do |line|
| + 169998 [pat.eyler gm] And yes, this way is much better (I knew it would be but, it's nice to
| + 170139 [w_a_x_man ya] seen = {}
| 170140 [w_a_x_man ya] seen, s = Hash.new(0)
| 170143 [w_a_x_man ya] seen = Hash.new(0)
| 170205 [drbrain segm] This is starting to get pointlessly obfuscated.
| 170292 [w_a_x_man ya] A standard Ruby idiom: instead of 3 lines . . .
| 170296 [james graypr] You would get a lot of support in Perland, but this kind of code is
| 170325 [perrin apoth] I can see, for readability's sake, wanting to avoid non-explicit data
| + 170330 [vjoel path.b] (1) easier to modify to use a different iteration method, such as map or
| | 170335 [perrin apoth] See, I knew I was being stupid about something. Thanks for setting me
| + 170332 [james graypr] `while gets` is also "non-explicit". It makes an assignment you do
| 170337 [perrin apoth] I was assuming a distinction between "explicit operation of the
+ 169926 [wilsonb gmai] Or, something else to think about.. shamelessly borrowed from this
| 169934 [drbrain segm] That is far too complicated and impossible to read. I think we
+ 169931 [mental rydia] It also autovivifies the hash element, but Ruby doesn't have
+ 169986 [penryu saiyi] That doesn't do what you think it does. In Perl, the {} here
| 170001 [sam.dela.cru] Tim,
+ 170002 [corey synthe] Or, in keeping with the DRY and KISS principles I humbly submit the
170005 [pat.eyler gm] pate@linux:~/scratch> cat nums
170008 [perrin apoth] Why? Backticks are great.
170013 [gregory.t.br] Platform independence?
170041 [perrin apoth] Good point. Okay, you win.
170113 [gregory.t.br] Of COURSE! :)
threads.html
top