320207-324948

320024-398284 subjects 320390-327040

Re: Sudoku Generator (#182)
320207 [ken97531@gm ] Although I'm quite new to both Ruby and programming, sudoku generator

[QUIZ] Unit Conversion (#183)
320213 [matt@mo s. a] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ 320402 [boesemar@gm ] ...
| 320596 [michael.ulm@] Either your glasses and cups are way bigger than mine, there seems to be
| 320597 [michael.ulm@] Oops, I understand the output now, the amount in the brackets is the total
+ 320803 [matt@mo s. a] Summary will be posted tomorrow; new quiz on Saturday. Apologies...

Memcached - clear all keys matching a pattern?
320214 [toastkid.wil] I have some pages that serve up a massive tree of html, with a few

International language encoding conversion
320216 [tao.wang.usa] Now that Ruby 1.9.1 supports utf-8, it will be great to play with some
320271 [matz@ru y- a] Ruby 1.9.1 can handle GB2312 and Big5 encoding directly (a la Ruby 1.8

Class.new and class keyword not the same?
320217 [transfire@gm] class X
+ 320218 [ara.t.howard] dunno why - but the fix is
+ 320273 [robert.dober] Strange, it is "fixed" in 1.9 (though I have an old version ruby 1.9.0

[ANN] Ruby Mendicant Post-Mortem
320224 [gregory.t.br] I finally did a writeup complete with acknowledgments about the Ruby

Re: Unit Conversion (#183)
320225 [transfire@gm] =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
+ 320227 [matt@mo s. a] Note to everyone else: using another lib, such as stick, is considered
| + 320228 [sepp2k@go gl] That's "another lib which does unit conversion" not "any other lib", right?
| | 320230 [matt@mo s. a] Yes.
| + 320243 [ryand-ruby@z] so... `units` isn't a library... is this cheating?
| | + 320244 [matt@mo s. a] Well, there are a number of past quizzes that would be rather boring
| | + 320246 [caduceass@gm] Don't forget mass can be converted to energy :)
| |   320272 [robert.dober] And patrol to dollars.
| + 320306 [kbloom@gm il] I disagree, and think that if he actually has a useful lib, he should
|   + 320313 [matt@mo s. a] It is cheating.
|   + 320314 [james@gr yp ] For what it's worth, I always invited people to submit whatever they
|     320315 [matt@mo s. a] Agreed. I said it was cheating, but I didn't say "don't cheat."  :D
|     + 320333 [CHubas7@gm i] It would be much more fun to include some non static conversion
|     | 320338 [matt@mo s. a] Go for it!  :D
|     + 320387 [robert.dober] Sorry for nitpicking, but it is *not* cheating. It might not be what
|       320404 [matt@mo s. a] Provide a simple, better word for "going against intended guidelines"
|       320436 [robert.dober] No problem at all, I have however taken some time to explain why I was
|       320535 [peter@ru yr ] ...
|       320538 [matt@mo s. a] Yes, the quiz is (usually) posted Friday, so submissions typically
|       320542 [peter@ru yr ] ...
|       320568 [transfire@gm] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
|       320569 [botp@de mo t] ...=20
|       320583 [transfire@gm] Given the conversation about "cheating", and what I know about the
|       320588 [matt@mo s. a] Ack... Fine, nothing is cheating; forget I ever mentioned it. Since
|       320651 [transfire@gm] Don't sweat it. I thought of it as "cheating" myself at first.
|       320707 [robert.dober] ...
|       320785 [transfire@gm] If this were a a contest, looks like you get the blue ribbon :)
|       320808 [robert.dober] I do not really merit this praise, though I appreciate it;). Actually
+ 320256 [peter@ru yr ] How about
  320257 [sepp2k@go gl] Or
  320262 [peter@ru yr ] ...

ruby on WindowsXP can't load module wx
320226 [linux@pi rd ] any idea why this happens?
320234 [luislavena@g] You didn't see a popup indicating the missing DLL?
320239 [alex@de et m] All wxRuby official builds for Windows are statically linked. On XP it's

Finding and writing to specified area in a text file
320229 [ryan@so li s] I'm trying to find a specified keyword in a text file that I have open
320238 [aldric@tr vo] In all of my research online, the only way that I've found to do it is
+ 320241 [ryan@so li s] I'm actually looking to replace some text/code in 3-4 places so i can't
| 320779 [michael.tome] A gsub (global substitution) should take care of the problem. Here's an
+ 320781 [opritescugeo] You know , there is an alternative to writing to a new file . You will

Overriding methods in a class using a mixin
320232 [jcoglan@go g] ...
+ 320247 [transfire@gm] and
+ 320249 [ara.t.howard] alias_method_chain_is_crap_because_it_leads_to_madness_like_this
  320269 [jcoglan@go g] ...
  320278 [ara.t.howard] couple observations after a quick browse

How to tell Scite where Ruby is located
320235 [chen_li3@ya ] I install Ruby to a new place instead of the default path, and I can't
320236 [phlip2005@gm] Options -> Open ruby.properties ->
320240 [chen_li3@ya ] Thank you very much.

web framework for Ruby 1.9
320242 [perfectly.no] 1) really works with Ruby 1.9
+ 320248 [ara.t.howard] it's called ramaze.
| 320260 [perfectly.no] Thanks. At least a basic app works fine in Ruby 1.9,
| + 320276 [ara.t.howard] perhaps - but there are far less than in any other ruby framework.
| + 320354 [m.fellinger@] Thanks for your feedback, I'll address these things.
+ 320291 [jeremy@bi sw] Rails satisfies all 5 for me, but you may find Active Support adds too
  + 320327 [perfectly.no] * Creating an app failed with an exception. Installing the test-unit
  + 320343 [pbooth@no oi] I'm just curious, why would you use 1.9 if JRuby has rails support?
    320348 [perfectly.no] There's Ruby 1.9, the language and then there are
    320349 [charles.nutt] We've already started adding 1.9 support and the plan is to have it done

[ANN] win32-file 0.6.0
320245 [djberg96@gm ] The Win32Utils Team is happy to announce release 0.6.0 of win32-file.

KirbyBase, Table Default Values not being assigned
320251 [adamtemporar] basic stuff such as inserting and selecting. I create my own record
320467 [adamtemporar] im still banging my head against a wall on this one. I have no idea what
320470 [pit.capitain] Adam, from quickly browsing through the KirbyBase code, it looks like
321071 [adamtemporar] Thanks Pit for that, ive decided to scrap the class and just work with

rake finds & runs task, but doesn't show in --tasks list
320253 [hdevlin@am r] namespace :load do
320254 [joe.swatosh@] desc "hello world"
+ 320255 [mo_mail@on h] Cheers,
+ 320301 [hdevlin@am r] thanks, Joe! that did the trick

Module.nesting for anonymous modules?
320258 [jcoglan@go g] ...

Re: Ruby Mendicant Post-Mortem
320259 [antonin.aman] Nice work Greg, I didn't had a look at the library yet but I like the
320289 [gregory.t.br] I didn't ask for funding, because I didn't have a particular project

how to call operator as function
320261 [fekete@me ko] could you help me please ? I'm trying to write a code where I could have
+ 320263 [peter@ru yr ] ...
+ 320264 [perfectly.no] left.send(:+, right)
+ 320265 [sepp2k@go gl] "+" =3D> Fixnum.instance_method(:+),
  320266 [fekete@me ko] it's Myclasses ++ operator
  320267 [sepp2k@go gl] You can't define ++ on any class. You just can't. If the parser sees ++

Ruby equivalent for Lua first-class functions?
320274 [francis.ramm] I think one of Lua's nice features is that all functions are first-
320275 [luislavena@g] ion as

IO#lineno= doesn't work the way I expected
320280 [perrin@ap th] I'm working on something that operates on each line of a file
320283 [TimHunter@nc] The way I read the ri doc for lineno=, it appears that all it does is
320286 [perrin@ap th] =20
320287 [mguterl@gm i] The description of the method is somewhat ambiguous if you ask me.
+ 320288 [mguterl@gm i] Or maybe even "This is line one thousand\n".  I'm not sure...
| 320290 [perrin@ap th] Okay, so . . .
| 320292 [TimHunter@nc] Why not iterate over the entire file and just ignore the first line?
| 320300 [perrin@ap th] How do you propose I "ignore" the first line?  That's what I was trying
| 320303 [jens.wille@u] in_fh = File.open(infile, 'r')
| + 320304 [TimHunter@nc] That's almost precisely what I was suggesting. For real code I'd want to
| + 320305 [perrin@ap th] Actually, that looks pretty good, all things considered.  I didn't
|   + 320312 [james@gr yp ] It works fine and, to be clear, it has nothing to do with line
|   + 320323 [jens.wille@u] maybe i should have said "throw away first line" in the comment? ;-)
|     320329 [TimHunter@nc] All I had in mind was that, when I write a piece of code that expects a
|     320330 [jens.wille@u] ah, ok, i see. thanks!
+ 320324 [shortcutter@] Exactly.
  320341 [perrin@ap th] The more I look at it, the more ambiguous it appears to be.
  + 320356 [james@gr yp ] Now that I agree with.  I have no idea why this method exits.  It's
  + 320394 [shortcutter@] That's the usual effect of staring at a sentence for too long. :-)  Relax.
    320411 [perrin@ap th] no=3D
    + 320475 [shortcutter@] Chad, let's agree to disagree and leave it at that.
    + 320478 [pit.capitain] Chad, in your very long answer to Robert you forgot to quote the most

How to force 'const_missing' in 'YAML.load'?
320293 [axyd80@gm il] Is there a way to force 'const_missing' exception in 'YAML.load' if the

Simple Question
320294 [zmanods@ho m] I saw the following in a book.
+ 320295 [serabe@gm il] def find(*args) # This * is not the same * as yours, this is just used
+ 320296 [peter@ru yr ] ...

having problem in printing out correct character
320298 [chen_li3@ya ] I copy some texts from a pdf file and save them in a text file. I
320302 [higgs.bozo@g] I have no idea, and I've never dealt with these issues.  So I asked
320311 [james@gr yp ] cii

Newbie question - Problem understanding W(p)GTR
320299 [seventhhorro] In w(p)gtr I have found myself facing a code which, for the life of me,
320321 [sepp2k@go gl] One hash for the first part of the name and one hash for the second, I assume.
320328 [seventhhorro] Thank you very much!

[ANN] erbook 4.0.0  (was previously named Gerbil)
320307 [ snk@gn .o g] erbook : write books and documents in eRuby
320357 [saji@ap c2 .] Nice software - hope to see the LaTex formatter coming out soon.

Ruby equivalent to a Java context Listener
320309 [scirious@gm ] Is there any Ruby equivalente to a Java Context Listener? So I can

erb & action_view outside rails
320310 [djlewis@tr a] I'm using erb as a templating package to generate html files -- not in
320316 [b.candler@po] This question would be better asked on a Rails mailing list.
320332 [djlewis@tr a] OK, makes sense, except...
320347 [b.candler@po] If you think about it: url_for relies very heavily on the action

dynamically create a hash of a objects variables values
320317 [adamtemporar] Tried my best to make this title as informative as possible but its
+ 320318 [stefano.croc] The method instance_variables returns an array containing the names of all the
| 320320 [adamtemporar] Wow stefano thats perfect. Ill research that method more on the ruby
+ 320325 [shortcutter@] irb(main):001:0> S = Struct.new :a, :b, :c

when will the ruby 2.0 be released?
320319 [rockyac@gm i] guys, I didn't find the schedule in the official site.
+ 320426 [Usenet@Go gl] There is no schedule yet.
| + 320476 [shevegen@li ] Are you implying that the ISO specification delays or halts Ruby
| + 320508 [Diego.Viraso] What do you mean by "more ambitious"? Could you expand on that?
+ 320539 [jballanc@gm ] Forgive me for saying this, but I think that version numbers are =20
+ 320675 [kbloom@gm il] The short answer is that we've long since abandoned the idea of

Re: win32-file 0.6.0
320331 [citrix_linux] Thanks for the nice work!

gsub and reg expressions
320335 [stuart.clark] I am having a few problems getting gsub to work with my regular
+ 320336 [sepp2k@go gl] Ehrm, why did put the regex into an array? That's what's causing the error.
| 320337 [stuart.clark] The regular expression needs to be in array otherwise I recover
| 320340 [sepp2k@go gl] It only needs to be in an array if you want to get an error. If you want the
| 320344 [stuart.clark] I see exactly what you are saying.....below is my data set.
| + 320345 [sepp2k@go gl] Yes, but that's not an array. That's a method call to String#[]. This has
| + 320346 [b.candler@po] event is some object
+ 320339 [kbloom@gm il] get rid of the [] around the regular expression.
+ 320342 [shortcutter@] As others have pointed out you are mixing up String#[] with String#gsub.

[ANN] UnicodeUtils 0.3.0 - case conversion, normalization and more
320350 [perfectly.no] VW5pY29kZVV0aWxzIGlzIGEgcHVyZSBSdWJ5IGxpYnJhcnkgdGhhdCBpbXBsZW1lbnRzClVuaWNv

Updating rubygems to 1.3
320358 [bjohnson@bi ] I am on a macbook pro. I need to install rubygems to 1.3 to update merb,
320368 [tim.pease@gm] sudo gem install rubygems-update

Why does tmail stop my CGI script form working?
320359 [perrin@ap th] I decided to try TMail for the back end of a new contact page on a
320360 [ryand-ruby@z] what does the web server's error log say? I doubt it dies silently.
320362 [perrin@ap th] It fails without any error that shows up in the browser.  Since it's
320365 [perrin@ap th] Whoops -- I had a typo in my exception handling code.  I've fixed it, so
+ 320366 [jeremymcanal] What user is the script running as?  The environment may not be setup
| 320367 [perrin@ap th] It's running as the same user both from the shell (where it works) and
+ 320372 [ryand-ruby@z] 1) multiple ruby installs, webserver is using something different.

Re: erbook 4.0.0  (was previously named Gerbil)
320361 [ snk@gn .o g] Thanks.  I'm planning to use Maruku's Markdown-to-LaTeX conversion
320369 [saji@ap c2 .] hmmm...i have to use double quotes to delimit the text - not very convenient.
320371 [ snk@gn .o g] Well, you could also use Ruby's %Q{} or %q{} or <<EOS syntax for writing
320928 [ snk@gn .o g] This has been fixed in erbook 5.0.0.

[ANN] nokogiri 1.0.6 Released
320364 [aaron@te de ] nokogiri version 1.0.6 has been released!

How can I overload a method in Ruby
320370 [youhaodeyi@g] class Impl
+ 320373 [ryand-ruby@z] short answer: you can't (via normal ruby).
| 320376 [youhaodeyi@g] I am new to Ruby. What's do you mean by default args?
+ 320374 [einarmagnus@] ...
| 320377 [youhaodeyi@g] ok I understand. Just curious, overload is a good feature in OO
| + 320378 [botp@de mo t] # ok I understand. Just curious, overload is a good feature in OO
| | 320380 [youhaodeyi@g] I want to write a build method which will build source code in a
| | + 320381 [botp@de mo t] # def build()
| | | + 320382 [botp@de mo t] # def build directory=nil
| | | + 320383 [youhaodeyi@g] I am a Java developer and new to Ruby. I think I really need some time
| | | + 320429 [joe@ta kh us] It's interesting that without the feature of overloading the code is =20
| | |   320445 [transfire@gm] Well, default arguments are a different matter really. That's all that
| | |   320448 [_mwryder@wo ] I know this will not work in every case, but can't you check the type of
| | + 320398 [pjb@in or at] Call it: buildWithDirectory(directory)
| |   320413 [lojicdotcom@] build_with_directory would probably be a more conventional Ruby function name.
| |   320414 [jcoglan@go g] ...
| |   320440 [lojicdotcom@] Yes, Pascal already provided a version with default arg values in the
| + 320379 [einarmagnus@] I find that overriding is much more powerful. You can override just =20
+ 320396 [transfire@gm] Although it is not the "Ruby Way" so to speak, Ruby is flexible enough

Tread on eggs.. Using metaprogramming to set a variable name?
320375 [aldric@tr vo] Something like ..
320386 [chris.lowis@] require 'rubygems'
320410 [aldric@tr vo] Thanks for doing the checking I should have done :(

mult dimensional arrays in ruby
320384 [sijo@ma xi n] What I am trying to do below is I have to enter two rows to the table
320406 [shortcutter@] What is self here?
320486 [sijo@ma xi n] Thanks for your reply

[solved, kinda] Re: Why does tmail stop my CGI script form working?
320385 [perrin@ap th] Unable to get tmail working properly on my shared hosting account, I
320408 [jeremymcanal] Why not try mailfactory if you're just sending e-mail?  If it's just
320412 [perrin@ap th] The problem actually appears to be one of something on the server being
320423 [james@gr yp ] open(%Q{| mail -s "#{sub_c}" #{to_c}}, "w") { |mail| mail << body_c }
320433 [perrin@ap th] That's an excellent point, and I wish I had thought of it.  I took your
320435 [james@gr yp ] Is sent meant to contain the output?  If so, we should probably change
320437 [perrin@ap th] =20

Problems passing parameters into XSLT
320388 [peter@se an ] I'm having some problems passing parameters into XSLT with ruby. The
320606 [peter@se an ] result = stylesheet.apply(xml_doc, {:root => "ROOT", :back => "BACK"})
324948 [jamie@da g. ] I just spent an inordinate amount of time trying to figure out why my

lazy requires
320389 [aidy.lewis@g] Are lazy requires generally a good idea
+ 320395 [transfire@gm] Why do you call that lazy? Do you mean "dynamic" requires?
+ 320501 [fox@ns l. su] Define good.
+ 320509 [stephen.celi] Requiring a full path can become messy with double requires if you
+ 320620 [erik@ho le s] It's certainly accepted practice, but with all things you need to ask if
threads.html
top