320390-327040 subjects 320812-381294

JRuby on Android (from: What would you like to know about Jruby?)
320611 [flo@an er gr] Is this just a claim or did you have a deeper look into the
320640 [charles.nutt] Admittedly, I have not spent a lot of time looking at Android, but I'm
320642 [flo@an er gr] First of all, thanks for the answer. As I see, it is not just a wild
320735 [charles.nutt] I believe so. We'd just want to pull off the compilation and code

Re: Is there a way to know what are the subclasses of a give
320612 [b.candler@po] class A; end

RegExp problem
320613 [jfferriere@g] Hy,
+ 320617 [jgabrielygal] irb(main):016:0> string="rzerze@foo@rezrzgrtez"
| 320629 [flo@an er gr] delimiter =3D Regexp.escape(delimiter)
| 320632 [jgabrielygal] I don't get what you mean by "too heavily rely", I mean, you are
| 320634 [flo@an er gr] you rely on the the behaviour of the dot. Meaning: yours matches
| 320641 [jgabrielygal] irb(main):071:0> "foo@fooo@bar@batz@foo".match(/([#{delimiter}])(.*?)\1/)[2]
+ 320647 [kbloom@gm il] string.split(/@/)[1]

find type of filesystem (*nix/windows)
320619 [ittay.dror@g] How can I find in ruby the type of filesystem from a given file? (pseudo
+ 320648 [damnbigman@g] ...
+ 323687 [djberg96@gm ] gem install sys-filesystem

Run a method in a Module
320622 [mario@be wa ] I have two different modules that contain a few methods with the same
320625 [jgabrielygal] If you want to call a method from a Module that's not supposed to be
320631 [mario@be wa ] In my case is a little bit more complicated since the modules I'll use
320633 [jgabrielygal] One way I managed to do it, although I'm not sure it makes sense for
320668 [mario@be wa ] So, there is not an easier way to call a method inside a module...
320669 [saji@ap c2 .] irb(main):001:0> module MyModule

install a ruby library with it's .gem file
320623 [lyesjob@gm i] ...
+ 320626 [flo@an er gr] Just run gem as usual, but from the path where the library lies.
| 321244 [lyesjob@gm i] ...
+ 320627 [peter@ru yr ] ...

Not enough space error on windows
320628 [ittay.dror@g] I get a 'Not enough space' error on windows. The disk has plenty of
320636 [kioo@in ot e] Could you give a little more context? What code did produce the error
320690 [ittay.dror@g] ...
321882 [ittay.dror@g] anyone?
322176 [rogerpack200] You figure this out?
322178 [ittay.dror@g] ...

Idiomatic status check
320635 [kioo@in ot e] how would idiomatic Ruby look like when it comes to status checks of
320645 [shortcutter@] Why not just

how can I invoke the 'include' in the class instance function
320649 [zhujie2003in] For same reason, I want to invoke the 'include' in the class instance
+ 320653 [mikael@ho lu] Call it on the class instead, as in `self.class.include QQ_Elem`.
+ 320656 [mike.gold.44] class QQ

Qs on RegExps
320652 [einarmagnus@] Now that we are on the topic of Regular Expressions I have a question

build hash by iterating
320655 [jason.lillyw] h = {}
+ 320657 [ara.t.howard] i might do
+ 320658 [jcoglan@go g] ...
| 320661 [jason.lillyw] perfect. Thank you.
+ 320660 [einarmagnus@] h = (0...15).inject({}) {|h, i| h[i] = (24+i*6).to_s; h}
+ 320662 [b.candler@po] new_hash = {}
| 320667 [jason.lillyw] Thank you. Enumerable#inject has always been scary to me. I'm having a
+ 320716 [botp@de mo t] # h = {}
  + 320726 [jason.lillyw] Botp, thanks. That is an easier way to look at it. Can I go back to this
  | + 320730 [caduceass@gm] Don't use +=, just +
  | + 320731 [botp@de mo t] # However, iterating over a hash is confusing me. Here is
  | + 320755 [b.candler@po] range = (1..4)
  |   320756 [b.candler@po] tmp = {}
  |   320762 [jason.lillyw] very excellent descriptions. All of this was extremely helpful! Thank
  + 320741 [shortcutter@] I'd even go as far as to question the whole collection approach: since=20

320663 [byrnejb@ha t] I discovered, quite by accident, that the postgres-pr project is alive

Question about host, gethostbyname and getaddress
320665 [fekete@me ko] Could you pleas help me with following problem ?
320685 [alan.wayne.j] gethostbyname and gethostbyaddr both return the "canonical name" in the first
320708 [fekete@me ko] I think we don't understand each other. I don't need reverse DNS (I would use
320710 [alan.wayne.j] TCPSocket.gethostbyname is confusingly inconsistent with Socket.gethostbyname.
320743 [fekete@me ko] I have to say you are not right. And if you are, then there is somwhere
+ 320748 [botp@de mo t] # ... why I believe this is true is, that "host" command works
| 320749 [fekete@me ko] this does not work either.
| 320750 [botp@de mo t] # so as I said before, I don't have reverse dns (e.g. to get=20
| 320751 [fekete@me ko] no, not helped, result is still same - no canonical name in array :-(
| 320815 [botpena@gm i] that is weird.  mine still works.
+ 320752 [alan.wayne.j] Ugh.  I am very sorry.  I've discovered why we are getting different results.

Error message, hide class name
320666 [transfire@gm] irb(main):005:0> class X
+ 320676 [transfire@gm] FYI, I decided to just chomp off everything after the 'for', so no big
| 320742 [pit.capitain] Tom, the so-called class path seems to be buried deep inside
| 320747 [transfire@gm] That's interesting!
+ 320745 [ryand-ruby@z] the problem isn't inspect or anything else to do with X, it is
  320746 [transfire@gm] Which is why I thought I should be able to override #class. And was

Help with Screen Scraper!
320683 [stockwet@ya ] 1) I open a connection to a url

Implicit Conversion
320686 [demetrickn@h] I'm new to this site I'm an intern at software company and was given the
+ 320688 [sepp2k@go gl] That error doesn't happen when you give an integer, it happens when you give
+ 320689 [alan.wayne.j] It doesn't sound like your error is necessarily what you think it is. That

Re: Trouble running 'rubyscript2exe' for compiling my code
320687 [xacobe@gm il] I'm also trying to solve the dreaded (RC=256) error when I try to

how do you run ruby on windows
320694 [aditya15417@] Okay so I've downloaded the One-Click Ruby Installer for Windows and
320695 [damnbigman@g] ...
320696 [aditya15417@] ak
+ 320698 [acooper@pr t] Make sure that you have your path setup correctly first, the installer =
+ 320699 [damnbigman@g] ...
  320700 [aditya15417@] o I
  320776 [michael.tome] Just in case you are having trouble with your Windows path variable,

help with partial
320697 [joripel@ms .] First and foremost sorry if my english is not the best.
320702 [ryand-ruby@z] this should go to the rubyonrails mailing list.
320704 [joripel@ms .] Sorry I move it now

Survey Invitation : Ruby + GUI
320701 [alex@de et m] Everyone's invited to take part in a short survey on using Ruby for GUI
+ 320719 [mo_mail@on h] Done - it's a nice list of questions you have there!
+ 320887 [perrin@ap th] =20
+ 324821 [larsch@be un] On Nov 19 2008, 11:43=A0pm, Alex Fenton <a...@deleteme.pressure.to>
  + 324823 [theyojimbo@g] I was wondering the same thing yesterday ;-)
  + 324963 [alex@de et m] Sorry, I got caught up in other work and haven't finished writing up the

Ayuda con Ejercicio
320703 [fernandovr@h] Buenas Tardes a todos, primero quisiera informarles que yo no se nada de
+ 320705 [alan.wayne.j] ve
+ 320784 [tirado.carlo] On Nov 19, 3:53=A0pm, Fernando Villafuerte <fernand...@hemac.com.mx>
  + 320882 [fernandovr@h] Muchas Gracias por su ayuda, el ejemplo con el que pude completar el
  + 320929 [caduceass@gm] For fun (no guarantee of accuracy, but works for 4_000_000)...
    + 321254 [ruby.student] ...
    + 322223 [caduceass@gm] When you do (max_inverted + 1) in the previous line, this works for 4_000_000.

ANN: One-Click Ruby Installer 186-27 Release Candidate 2
320709 [luislavena@g] At last second release candidate of 186-27 got released.
320712 [TimHunter@nc] Thanks so much for your work, Luis! I know this represents many hours of

RubyGems load path
320713 [divoxx@gm il] How can i change the RubyGem load path, so that requiring a gem from
320720 [luislavena@g] You should look into GEM_PATH and GEM_HOME environment variables.
320757 [divoxx@gm il] Sweet! Thanks :)
404182 [lists@ru y- ] codes. Why? My project file tree is
404188 [chris.hulan@] You say image.jpg is the file
404197 [tigre7t@gm i] may i suggest also spell check

jruby, profligacy
320714 [einarmagnus@] I am trying to test out profligacy for GUI as it seems to make it
320737 [charles.nutt] Compilation is not hard, but you'll always need to ship JRuby if it's
320744 [einarmagnus@] I'm sure it isn't, I'm just not that used to java anymore. been a while.
320772 [james.britt@] Look at Rawr

Is there another method like .next?
320717 [_mwryder@wo ] I was looking for a way to iterate through the ascii values and was
320724 [caduceass@gm] For classic printables...
320728 [_mwryder@wo ] I think this should be (32...127).map as 128 is the not printable.
320732 [caduceass@gm] Thanks for the correction :)  Actually, it's the 127 that's not

Re: One-Click Ruby Installer 186-27 Release Candidate 2
320718 [bill.walton@] That certainly gives me a more informed appreciation for just how much we,
320722 [luislavena@g] ased
+ 320729 [aaron@te de ] Actually.......
| 320760 [luislavena@g] On Nov 20, 2:32=A0am, Aaron Patterson <aa...@tenderlovemaking.com>
+ 320766 [david.mullet] I absolutely agree!
  320769 [rperezm@uc .] I use both Windows and Linux. In Linux I have not problems but in =
  320773 [luislavena@g] I have some one. Can any say me where to download this OneClic Installer f=
  320774 [rperezm@uc .] What you mean with this? Is this a problem if I install this RC2 and =
  320786 [luislavena@g] try to update?

How the Ruby's super work in finding method?
320721 [qianjigui@gm] When one method defined in many places, I want to use the super to
320723 [ymendel@po o] First of all, you can't define a method more than once. That is,
320763 [qianjigui@gm] Thanks for your help.

BFS in ruby from a hash
320725 [aditya15417@] can anyone give me some idea where to start as I've never done bfs
320739 [shortcutter@] If you just want to visit all nodes (i.e. not a search) then you need to
320764 [aditya15417@] Yes I know the algorithm of doing BFS, however I can't see where a
320768 [hgs@dm .a .u] ...
320770 [shortcutter@] Well, isn't this (i.e. analyzing the problem) part of your assignment?
320775 [caduceass@gm] Definitely agree with robert here.  But the $database seems contrived.
320778 [aditya15417@] ple
320783 [shortcutter@] Go to the upper right corner of your web browser window. Enter "ruby
320792 [aditya15417@] Is there another common way to do it without using queue?

[ANN] mechanize 0.8.5 Released
320733 [aaron@te de ] mechanize version 0.8.5 has been released!

Compiling Ruby Scripts (Ruby 1.9.x)
320734 [max@sp rk ma] I was wondering if it is possible to compile Ruby code for Ruby 1.9.x .
+ 320738 [charles.nutt] JRuby will have 1.9 support soon, and supports precompilation and
| 320818 [paulf@a2 li ] Can you guess (estimate) as to "how soon" for packaging as a single jar?
| 320821 [charles.nutt] We hope to have 1.9 support all finished by Christmas time or so.
| 329577 [max@sp rk ma] So the compiled package (rwar file) runs on JRuby?
+ 320753 [jballanc@gm ] If you are deploying to OS X, MacRuby's HotCocoa library has a built-

320740 [megal47@ya o] DISNEY VISA CARD

How to use fastercsv to get rows as hashes?
320758 [s_ayalon@ho ] require 'fastercsv'
320765 [james@gr yp ] def read_csv(path = "/home/work/some_file.csv")
320767 [s_ayalon@ho ] That's exactly what I needed - many thanks!

search reg-exp for exact match
320759 [johnnybutler] I have a regular expression
320761 [jgabrielygal] To do exactly what you are asking for: you can anchor the regexp
320899 [shortcutter@] I'd rather use /\A200[3-9]\z/.

How to get an absolute link from WWW::Mechanize
320780 [opritescugeo] I noticed links in mechanize have an absolute? method , which tells me

create a md5 / md5 passwd with a salt
320787 [peter@iw bs ] This problem is so above me my head is swimming.
+ 320788 [synfinatic@g] user_pwd = Digest::MD5.hexdigest(Digest::MD5.hexdigest(password) + salt)
+ 320797 [b.candler@po] You should give an example of a password, a salt, and the expected
| 320799 [peter@iw bs ] From the first solution given it works as it should. All that was
| 320807 [b.candler@po] Glad it works. Note that if password and row[0] are Strings, you should
+ 320809 [gdonald@gm i] There are a number of MD5 lookup dictionaries already online for a
  320850 [b.candler@po] I think you're confusing two things.

Array.include? with a regex?
320789 [sergio@vi la] i am wondering if this is possible.. i can't seem to figure it out..
+ 320790 [peter@ru yr ] ...
+ 320796 [b.candler@po] irb(main):001:0> a = ["pie","cookies","soda","icecream"]
| 320800 [sergio@vi la] everyone rules!
| 412247 [lists@ru y- ] When checking whether the array "includes" the regex expression, you're
+ 412253 [lists@ru y- ] a.any? { |val| /^coo/ =~ val }

Regexp issues...
320793 [tmcdowell@gm] On line 42, I get an error that there is no function '[]' for
+ 320794 [stefano.croc] You get that error because Regexp#match returns nil if there's no match. In
+ 320795 [sepp2k@go gl] Your regex does not match the string, so the call to match returns nil.
  320802 [tmcdowell@gm] Ah... hehe, thanks guys!

Regular Expression help needed
320798 [avr_1@ya oo ] I have the following text as a string. Can someone tell me a way to
+ 320806 [diogoslisboa] str =~ /Args=\[\{(.*)\}\]/
+ 320825 [einarmagnus@] hash = {}
+ 320859 [mark@th ma z] It's obviously some sort of object serialization format. I can't tell

Sieve of Zakiya
320801 [jzakiya@ma l] I've uploaded optimized upgraded versions of my SoZ prime generators,
+ 320823 [brabuhr@gm i] $ jruby -J-Djruby.jit.logging.verbose=true SieveOfZakiya.rb
+ 320824 [brabuhr@gm i] $ uname -a
| 320827 [brabuhr@gm i] $ jruby -J-server SieveOfZakiya.rb
| 320833 [charles.nutt] Odd...the main script, or a method in it, must be gi-frigging-gantic to
| 320834 [charles.nutt] Yeah, there's several methods there that could easily blow the cap and
| 320996 [jzakiya@ma l] On Nov 21, 1:31=A0am, Charles Oliver Nutter <charles.nut...@sun.com>
| + 321004 [brabuhr@gm i] Cool, I'll try to give it a go on the same machine later today.
| + 321011 [cremes.devli] On a Mac Pro (2.8 Ghz). Jruby 1.1.5
| + 321047 [brabuhr@gm i] $ ruby1.8 -v SieveOfZakiya.rb
+ 321019 [lloyd@2l ve ] I looked at the code in there and it seemed awfully complex and
  321033 [jzakiya@ma l] ] =3D

Hpricot scraping returns nil
320804 [sergeimaerte] Good evening
320819 [jayanjacob@y] It should work if you take the tbody off the xpath. I have read
+ 320845 [peter@ru yr ] ...
+ 320853 [sergeimaerte] I'll try it in a minute, thank you for the answer.
  320855 [sergeimaerte] and it does work! Thank you very much Jn Jakob

collect links
320805 [aart85@gm il] ...

Make RDoc escape inner element strings
320810 [jose@um .e u] <a href="classes/ActiveSupport/TimeZone.html#M001007"><=>
320933 [jan.svitok@g] What version rdoc do you have? It seems that
321041 [jose@um .e u] I updated to 2.2.1 but it still wont escape the < > characters in the
321048 [jan.svitok@g] ===================================================================

Found a ruby bug in the URI class, what do I do?
320811 [bjohnson@bi ] I'm pretty sure this is a bug, and it seem so obvious that I'm thinking
+ 320814 [hassan.schro] No, it's not. Check the DNS RFCs: A-Z, a-z, 0-9 and the hyphen are
| 320849 [b.candler@po] That's not strictly a DNS limitation. However there are old (pre-DNS)
+ 401830 [lists@ru y- ] Here's a workaround that fixes URI.parse.
  401833 [tamouse.list] Underscores aren't valid in domain names..., just a-z, 0-9, and -
  401837 [lists@ru y- ] 1) See Brian Candler's informative post above mine.
  401838 [tamouse.list] I see his point, and yours, but I would say your patch is not solving
  401846 [lists@ru y- ] Well - it's not a proper fix from the perspective that URI is broken
  401876 [tamouse.list] 1.9.3-p194 :047 > u = URI::Parser.new(:HOSTNAME =>