On Sun, Feb 17, 2013 at 9:14 PM, Joel Pearson wrote:
> I've attached my attempt at converting your code to suit mine (hope you
> don't mind the plagarism :p )
No, it's not a doctoral thesis. :-) (allusion to German politics)
> I have a list of some of my plans to add functionality at the top, a
Ruby is well documented and comes with an interactive facility. If you show
that you have tried something first in irb, you will earn more good will.
(http://www.catb.org/~esr/faqs/smart-questions.html#beprecise in Mr. Klemme's
reply.)
-a.
On 15 Feb 2013, at 8:25 AM, Robert Klemme wrote:
>
Can you explain the dynamic condition? Your example has been solved by a
number of people for an equality test, but do you require something more
complicated? #reject will probably get you most of the way there, but there
may be other ways of approaching the problem if 'dynamic' is something
On Thu, Feb 14, 2013 at 1:49 PM, Joel Pearson wrote:
> That's an interesting way to do it. If I assume that any bang method I
> write in a given class would also have a non-bang method, then I could
> easily have a catch-all process define the methods for me when an
> instance is generated. Cool!
On Thu, Feb 14, 2013 at 1:06 PM, Joel Pearson wrote:
> I've been wondering about the best way to quickly create a "bang"
> version of a method (specifically one which overwrites self). Is there a
> better DRY approach than the below?
> I guess that there's probably a way to input a list of methods
First, if one stops responding, the requests will dry up.
Second, I believe many if not most of the "problematic" emails come from the
ruby-forum gateway.
While it's painful, I would advise treating any posts from the gateway as
probable spam. Mark them in light-grey on white text in your mess
On Sat, Feb 16, 2013 at 9:46 PM, Love U Ruby wrote:
> That's why array#replace allowed on the frozen array, but none of the
It isn't
irb(main):001:0> a=10.times.to_a.freeze
=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
irb(main):002:0> a.replace [10,20]
RuntimeError: can't modify frozen Array
from