264231-265820 subjects 264637-374548
Re: Prototype (the real thing from Ara) problem.
264423 [ara.t.howard] i've broken it with the latest attributes release - i'll fix soon...
264425 [gregory.t.br] gem locking a good idea? :)
264431 [ara.t.howard] obj = Object.new.instance_eval do
+ 264432 [wayneeseguin] ...
| + 264434 [sepp2k@go gl] It makes the block return the value of self (i.e. the newly created object).
| | 264437 [wayneeseguin] ...
| | 264439 [ara.t.howard] i wouldn't say that - i bloody forgot it the first time making the
| + 264435 [gregory.t.br] => 2
+ 264458 [robert.dober] That is hilarious, but it will put me back to where I was fleeing from,
Returning argument as a number problem
264424 [h4z3@th -c r] def random(len)
+ 264426 [stefano.croc] No, $1 will always be a string: the $1.. variables are set to the part of
| + 264428 [h4z3@th -c r] Oh sweet that works perfect, thanks alot
| + 264429 [stefano.croc] I forgot you also need to change the beginning of the random method. Since len
+ 264427 [sepp2k@go gl] Are you aware that if len is a number this will always be true (and it would
264430 [h4z3@th -c r] Yeah i realized that after i got it working, Wasn't thinking straight,
ruby to C to .so executable
264442 [Reid.Thompso] I am trying to revisit something that I'd found on line last September,
264447 [Reid.Thompso] Found it -- ruby2cext
Why don't Ruby libraries share memory?
264445 [matt@te md w] This paragraph is motivation. While my question is not Rails-specific, I am
+ 264446 [wayneeseguin] ...
+ 264448 [jan.svitok@g] I suppose the main problem is that Rails (or ActiveRecord, I don't
| + 264449 [jan.svitok@g] And one more note: you can save a bit of memory, if you put the thread
| + 264455 [gregory.t.br] It's actually what Wayne mentioned. Since all Ruby classes can be
| + 264463 [matt@te md w] Thanks for your reply; but I am still wondering about a more general
| | + 264485 [overlord@gm ] C-libraries have 2 nice features: They are read only, and ready to use
| | + 264499 [dan-ml@da 42] The problem goes further than that. Even if you were to load your libs
| | + 264514 [vjoel@pa h. ] What does 1.9 do differently?
| | + 264530 [drbrain@se m] For .so files, no, for .rb files, yes.
| + 264572 [khaines@en g] This is not the issue, really, when talking about issues of throughput
+ 264503 [drbrain@se m] You'll get closer to the behavior you expect if you use Kernel#fork
confused by back refs in gsub
264450 [pbailey@bn .] Can someone tell me why, in my code below, I'm getting part of the
+ 264451 [jan.svitok@g] require 'test/unit'
| 264454 [pbailey@bn .] Thank you, Jano. Yes, this worked for me now.
| 264476 [overlord@gm ] Please note that regular expressions aren't a very good way to parse
+ 264453 [fwmailinglis] charset="US-ASCII"
264459 [pbailey@bn .] I don't quite understand your suggestion, Felix. Yes, I believe my
+ 264460 [stefano.croc] What Felix is suggesting is that, if the source is valid XML, then it will
+ 264462 [fwmailinglis] charset="US-ASCII"
264477 [overlord@gm ] As well as any substring "registrantName>". And well-formed XML won't
264548 [pbailey@bn .] Thank you, everyone. Yes, my XML is well-formed, but, it's also pretty
TCPSocket select method
264456 [rogerpack200] class TCPSocket
+ 264498 [globyy3000@h] The kernel select method -
+ 264513 [sylvain.joye] It cannot use IO.select since IO.select is a singleton method of IO and a
264529 [drbrain@se m] They are.
264620 [rogerpack200] class TCPSocket
264629 [thomas.mackl] Enumerable#select takes no args... perhaps you have an array of IOs
264461 [patrick.hoog] I just started with SOAP and Ruby and after one day trying to get it
264464 [dejan.dimic@] You should send your question to http://groups.google.com/group/soap4r
264518 [patrick.hoog] I just did, thank you
Working with classname that is stored in a string
264466 [damnbigman@g] ...
+ 264470 [sepp2k@go gl] I believe you are looking for const_get.
| 264472 [damnbigman@g] ...
| 264473 [gavin.kistne] In the Rails world (or ActiveSupport in general), see also the more
+ 264471 [bryan.duxbur] One thing you can do is not use a string at all, but pass the class name
264475 [amslonewolf@] I am a total Ruby Noob, so anyhelp would be much appreciated. I am sure
264628 [rgkaufman@gm] ...
264656 [dangerwillro] Tim Hunter released a script that installs RMagick and ImageMagick
[ANN] rubyforge 0.4.4 Released
264481 [ryand-ruby@z] rubyforge version 0.4.4 has been released!
[ANN] hoe 1.3.0 Released
264482 [ryand-ruby@z] hoe version 1.3.0 has been released!
[ANN] rubyhitsquad's vlad 1.0.0 Released
264484 [ryand-ruby@z] vlad version 1.0.0 has been released!
+ 264505 [Bil.Kleb@NA ] LOL.
| 264507 [phlip2005@gm] That explains the line from the Beastie Boys that rhymes that with
+ 264776 [vjoel@pa h. ] Since you're using the external ssh program, you might consider using
+ 264806 [wilsonb@gm i] We considered this, but there's a bug in the current version of svn
+ 264807 [drbrain@se m] We're letting people set this per-host with their ~/.ssh/ssh_config.
Can a lambda or Proc object yield a value to a block?
264492 [mick.macamhl] I've searched quite a bit on the web and through "Programming Ruby - the
+ 264494 [logancapaldo] ...
| 264658 [mick.macamhl] Thanks for the reply Logan. Obviously I'll have to study Ruby's scope
| 264667 [logancapaldo] ...
+ 264504 [lojicdotcom@] On Aug 13, 9:11 pm, Mick Macamhlaoibh <mick.macamhlao...@gmail.com>
[ANN] memcache-client 1.5.0 Released
264495 [drbrain@se m] memcache-client version 1.5.0 has been released!
[ANN] Sphincter 1.1.0 Released
264500 [drbrain@se m] Sphincter version 1.1.0 has been released!
Why is rake really slow?
264508 [richpoirier@] Is rake supposed to be really slow?
+ 264510 [ryand-ruby@z] no, not that it is supposed to be really fast... but it isn't what
+ 264645 [jim@we ri hh] Rake in and of itself is quite fast. There are two types of things that
264676 [richpoirier@] Thanks for the replies. Yes I'm working with rails. I think you are
264813 [richpoirier@] Ok I've narrowed down the environment part of the problem. What's
+ 264823 [gethemant@gm] Its normally a good idea to take out actual db connections when
| + 264849 [d_rems@ya oo] Could this be your problem too.
| | 264891 [richpoirier@] I'm just connecting to my local db, that post has to do with
| + 264890 [richpoirier@] I'm running rails tests though. Don't most rails tests require a db
+ 264893 [ news@ja .f ] On my 3GHz dual-core Athlon, under either Cygwin or virtualized Ubuntu,
+ 264904 [alexey.verkh] Err... is it to run One-Click Installer Ruby instead of Cygwin?
+ 264930 [richpoirier@] That's really interesting Jay. I'm running RoR on my HP dual core AMD
264989 [richpoirier@] Ok here's an easy way to compare performance. I decided to see if it
Re: rubyhitsquad's vlad 1.0.0 Released
264515 [ciconia@gm i] Congrats! looks really nice.
what is "dynamic constant assignment"
264516 [seanliugm@gm] ...
264519 [kanellopoulo] Variable AB is a contant, because it starts with a capital letter.
264520 [stefano.croc] That's not true. You can assign a value to a constant more than once, even if
264535 [logancapaldo] ...
+ 264536 [shevegen@li ] Ruby does not allow redefinitions of constants
+ 316121 [rogerpack200] Or, if you aren't in a class method
[1.9/12928] problem with -r debug
264517 [keltia@gm il] I'm running 1.9 from svn (revision 12928) on OS X. I appreciate that
[C ext to Ruby] how to output a octal coded number ???
264522 [yvon.thorava] i write a C extension to Ruby, some methods are dealing with octal
+ 264531 [drbrain@se m] The easiest way will probably be to use sprintf. From C, use
+ 264566 [tim.pease@gm] Ruby displays integers in base 10 format. I do not believe there is a
+ 264580 [overlord@gm ] A integer in ruby is a numeric value, it's not octal or decimal.
Symbols and strings
264523 [magnus.hacke] as a long-term perl user just recently converted to ruby, I'm curious
+ 264525 [robert.dober] This question is asked very frequently, please search the archives for
| 264527 [magnus.hacke] Thanks, that cleared a few things for me.
| 264547 [TimHunter@nc] Don't make more out of this than there is. A symbol is a kind of literal
| 264550 [phlip2005@gm] So if you add a method to one :foo, can anyone who invokes :foo access
| 264553 [dblack@ru yp] $ ruby -ve 'class << :abc; end'
+ 264526 [stefano.croc] Symbols and strings are two different things. There are several situations in
Does an Array#apply make any sense at all?
264532 [nikolai.weib] I wanted to write a simple method for comparing two paths on a Windows
+ 264533 [drbrain@se m] Is there something wrong with Pathname#==?
| 264549 [nikolai.weib] Yes, not that it can't be fixed, but the current definition is sort of
| 264605 [drbrain@se m] Could you file a bug on the Ruby tracker? (Or has it been fixed?)
| 264685 [nikolai.weib] Well, the documentation is pretty clear about what it does. Even
| + 264688 [shortcutter@] I dislike this kind of automation behind the scenes because there may
| + 264746 [mday@ma .c m] Seems like a bad idea to me. Case sensitivity is not a property of
+ 264552 [shortcutter@] Your method should be called "apply!" because it's destructive. I'd
| + 264554 [nikolai.weib] On Aug 14, 1:51 pm, "Robert Klemme" <shortcut...@googlemail.com>
| + 264555 [dblack@ru yp] I could be wrong, but I think the convention (at least in core Ruby)
| | + 264569 [nikolai.weib] Ugh. This was so NOT about whether to call the method Array#apply or
| | | 264571 [dblack@ru yp] I know -- I was just replying to a tangential point that Robert
| | | 264686 [nikolai.weib] Ah, OK. Yeah, I suppose that's true. Still, my second suggestion for
| | + 264570 [overlord@gm ] That is true for Array#delete. delete is always destructive, there is no
| + 264558 [nikolai.weib] On Aug 14, 1:51 pm, "Robert Klemme" <shortcut...@googlemail.com>
| + 264762 [w_a_x_man@ya] On Aug 14, 6:51 am, "Robert Klemme" <shortcut...@googlemail.com>
| 264886 [nikolai.weib] Very nice.
+ 264556 [transfire@gm] On Aug 14, 2:40 am, "nikolai.weib...@gmail.com"
264568 [nikolai.weib] It's not about the line count but about executing the same set of
264626 [SimonKroeger] def normalize path
Exchanging the extension in a filename
264534 [ronald.fisch] I have a string representing the name of a java file. I would
+ 264539 [logancapaldo] ...
+ 264579 [overlord@gm ] I'd match the point too, not everything that ends with "java" is java
| 264861 [ronald.fisch] In general, yes, but in my case I *know* that the file ends in .java
+ 264602 [w_a_x_man@ya] On Aug 14, 5:05 am, "Ronald Fischer" <ronald.fisc...@venyon.com>
| + 264859 [ronald.fisch] Thanks - this is a nice alternative (for the case I actually
| + 264899 [shortcutter@] I'd rather include the dot to avoid renaming files called "foo.notjava"
+ 264929 [jim@we ri hh] require 'rake' # NOTE: Not running rake, just using its library.
Need help cleaning up a model method
264541 [ruby-forum@g] I need a little help cleaning up the method below. In my .NET days I
+ 264542 [ruby-forum@g] Apologies, I meant to post this in the Rails group.
+ 264543 [jan.svitok@g] what about this?
+ 264546 [logancapaldo] ...
264599 [ruby-forum@g] Thanks to you both for your help
Any Muslims around?
264551 [kyrreny@br a] Just wondering if any Muslims have gotten around to making a Ruby script
+ 264557 [ronald.fisch] I guess time for prayer is at certain times per day? You could
| 264563 [jmettraux@op] sudo gem install openwferu-scheduler
| 264777 [kyrreny@br a] ...
| 264863 [ronald.fisch] But you have the timezone for each location, right? If you use the
| 264900 [kbloom@gm il] I prefer the tzfile gem for dealing with timezones.
+ 264573 [kbloom@gm il] Would this help? I use it as part of a suite of scripts for computing
264775 [kyrreny@br a] Thanks a lot Ken, and the same to you guys, Ronald and John.
Re: how to output a octal coded number ???
264561 [yvon.thorava] OK, thanks, but i don't want to print it just have it as a return
+ 264584 [yvon.thorava] OK thanks
| 264700 [overlord@gm ] I don't quite understand the purpose of your extension. Normally you do
+ 264593 [phrogz@ma .c] Despite the name, sprintf does not actually print the value to stdout.
+ 264607 [drbrain@se m] sprintf returns a String. You can print it with puts if you want, or
Convert a n binary number to /n
264574 [z4n9ief@gm i] If my number is 1111, I would like to had 0000.
264576 [fxn@ha hr f.] irb(main):003:0> "0011".tr("01", "10")
264646 [ snk@gn .o g] Or, if you're working with integers (as opposed to strings), then you
264648 [z4n9ief@gm i] Thanks :)
264664 [promos@bu ch] sprintf("%04d", 1111- 1111) -> 0000
! semantics (was: Re: Does an Array#apply make any sense at all?)
264577 [dblack@ru yp] And push, pop, <<, concat, replace, clear.... There's definitely no
264699 [overlord@gm ] Which all have to be modifying. With the exception of concat. (The Unix
264703 [dblack@ru yp] ! does not mean modifying; it means "dangerous".
+ 264794 [logancapaldo] ...
| 264811 [drbrain@se m] Instead of modifying anything, #exit! doesn't clean up after itself
+ 264803 [overlord@gm ] Most methods flagged with a ! are dangerous because they modify their
264805 [dblack@ru yp] Many of them are, but there's no cause-and-effect between modifying
265025 [overlord@gm ] You are hitting a strawman.
265027 [dblack@ru yp] It's all there, just spread out between the email address and the
JRuby and Netbeans Matisse GUI builder
264578 [leslieviljoe] ...
264582 [kyleaschmitt] Is it out of beta? I'm using NB6 beta for my home-ruby projects, and
264600 [leslieviljoe] ...
264616 [jamesthepipe] Do those milestones mean anything to anyone? I just download the
264687 [leslieviljoe] ...
264690 [charles.nutt] There's some discussion on using the "cluster" bits from the Hudson
264727 [jamesthepipe] I always take the full IDE - I figure NetBeans is changing everywhere,
change of Symbol to respond to intern?
264583 [thomas.mackl] def foo(sym_or_str)
+ 264585 [ccthiel@gm i] ...
+ 264594 [CHubas7@gm i] irb(main):005:0> :FOO.to_sym
+ 264596 [rmagick@gm i] Symbol responds to #to_sym, as does String. Will that do?
+ 264597 [coder68@ya o] irb(main):001:0> class Symbol; alias_method :intern, :to_sym; end
+ 264624 [thomas.mackl] I knew about overloading Symbol, but I think we can all agree that's
264742 [overlord@gm ] But probably want to do the to_s anyway, because that doesn't pollute
[ANN] RubyCocoa 0.12.0
264587 [laurent.sans] I am honored to announce the immediate release of RubyCocoa 0.12.0.
Re: RubyCocoa 0.12.0
264589 [yvon.thorava] On 14 ao?t, 18:04, "Laurent Sansonetti" <laurent.sansone...@gmail.com>
264592 [laurent.sans] Thanks, I just forgot to update the website, now it's done :)
BackgrounDRb: Re-call do_work or non blocking methods?
264595 [ruby-forum@m] I've been trying to use BackgrounDRb for a couple of weeks now and have
Can ri distinguish core methods from 3rd party methods? [was: Non Existent Method Dir.empty? Description via "ri"]
264601 [djberg96@gm ] On Aug 14, 11:33 am, "Wolfgang N?dasi-donner" <ed.oda...@wonado.de>
+ 264606 [james.britt@] I believe this is a known problem. (Known, at least, on the ruby-doc
+ 264608 [phrogz@ma .c] I think that's a hack solution to the problem. It might be a good idea
| 264612 [james.britt@] Quite true. Every so often people write to me to complain/inquire about
+ 264610 [drbrain@se m] ri --system
264618 [ed.odanow@wo] It helps in this case, but if some parts of the standard library change
264604 [zhihang108@h] shoes369 supply all kinds of shoes .popular and fashion,clothes
How to parse the "next" button on yahoo resultpages?
264611 [kls4f345m_fo] I'm new to ruby and I really like it. But I'm standing in front of a
264654 [dangerwillro] At some point you simply have to look at the html generated by Yahoo
image_science .so being called from my home dir - help
264613 [mikeisgreat@] Anyone seen this before?
Is there a thread safe implementation of a priority queue?
264614 [lolz.llolz@g] I could only find a class called Queue in RDoc. Is there no (thread
264627 [vjoel@pa h. ] vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
attr_* position in a class and their results
264615 [jub@so en a.] class Vartest_before
+ 264619 [stefano.croc] In the case of Vartest_before, when you call
+ 264621 [sepp2k@go gl] This defines a method instance_variable
264622 [jub@so en a.] Ok, I'm must be tired because I was expecting just the opposite, which
264631 [shortcutter@] Maybe it was even caused by using a different order in class definition
post xml over https connection
264625 [byte8bits@gm] Has anyone posted xml data over a https connection? We have a vendor
+ 264633 [shortcutter@] Just like with HTTP: set the content type to "text/xml" and send (post)
| 264716 [byte8bits@gm] nex = Net::HTTP.new("https://127.0.0.1", port)
| 264720 [keith@au io ] (Not sure that 'data' is set correctly above...)
| 264728 [byte8bits@gm] That was silly of me. Thank you for the example and the doc pointer. I
+ 264659 [fwmailinglis] charset="US-ASCII"