"Love U Ruby" is a troll trying to steal time.
See his other "posts".
If his original question would have been solely
about * then he would not have had the need to
write such awful code to pseudo-legitimize his
question.
I mean, he *must* know ruby because he purposely
returns an Array, and calls the method to_hash:
def to_hash
[@x => @y]
end
WTF?!?!
To the guy behind "Love U Ruby", please - go grow
up, find a job, then you won't have a need to go
trolling for reactions.
class Foo
def initialize(x,y,z) @x, @y, @z= x, y,z
end
def to_hash
[@x => @y]
end
end
=> nil
foo=Foo.new(10,11,12)
=> #<Foo:0x11f8968 @x=10, @y=11, @z=12>
a,*b=foo
=> #<Foo:0x11f8968 @x=10, @y=11, @z=12>
a
=> #<Foo:0x11f8968 @x=10, @y=11, @z=12>
b
=>
Here the results are not same as with the above. So is it calling my
first instance method automatically? Couldn't understand the logic.
WHY do you think that? why you dont get the IDEA that it MAYBE calls
to_ary? becaue *arg is the Splat Operator that parts Arrays into
members, and MAYBE it calls to_ary is the object is not an Array?
"Love U Ruby" is a troll trying to steal time.
See his other "posts".
Really never thought about to "steal" your time, no intention of that. I
just asked you guys as you are expert. Just give me a tips or trick ...
That's enough, I will dig into that. Please don't tell that way;You are
educated on this, thus asked. And another person also trying to be fit
on your domain, Is it bad? You should be proud by thinking that - what
you love,others too. If anyone incomplete, please try or at-least give
him/her something so that he can be strong.
We should share our knowledge - that's why the forum built,to keep you
and like me, or you like you people come close and help each other.
···
I mean, he *must* know ruby because he purposely
returns an Array, and calls the method to_hash:
def to_hash
[@x => @y]
end
WTF?!?!
To the guy behind "Love U Ruby", please - go grow
up, find a job, then you won't have a need to go
trolling for reactions.
As we've seen, on the splitting side (i.e. the RHS of an assignment, if
any) the splat operator attempts to convert an object into an array, pretty
sure it does it by calling that object's to_a method. Thus the following
would be functionally identical:
a = *(2..5)
a = (2..5).to_a
However it does more than that. The splitting side of splat can splice the
splatted value into an array, for example:
a = [1, *(2..3), 4] # => a = [1,2,3,4]
By paring that down and removing the 1 and 4, you can see why:
a = [ *(2..3) ] # => a = [2,3]
It splices the splatted range into the existing (anonymous) array. If you
want it to be nested inside, you have to explicitly call `(2..3).to_a`
instead.
···
On 25 February 2013 02:24, Love U Ruby <lists@ruby-forum.com> wrote:
when we write the "range" with splat(*) generally got the array as
below:
>> a = *(2..5)
=> [2, 3, 4, 5]
But in the previous case why I got [2, 3, 4, 5] not [[2, 3, 4, 5]]
>> a = [*(2..5)]
=> [2, 3, 4, 5]
>>
As described below, you are a "leech" help vampire:
As I've said before, mend your ways.
···
On Feb 19, 2013, at 6:46, Love U Ruby <lists@ruby-forum.com> wrote:
Really never thought about to "steal" your time, no intention of that. I
just asked you guys as you are expert. Just give me a tips or trick ...
That's enough, I will dig into that. Please don't tell that way;You are
educated on this, thus asked. And another person also trying to be fit
on your domain, Is it bad?
On Feb 19, 2013, at 6:46, Love U Ruby <lists@ruby-forum.com> wrote:
Really never thought about to "steal" your time, no intention of that. I
just asked you guys as you are expert. Just give me a tips or trick ...
That's enough, I will dig into that. Please don't tell that way;You are
educated on this, thus asked. And another person also trying to be fit
on your domain, Is it bad?
Yes, the way you do it IS bad. You are a help vampire:
Firstly this is not a forum but a mailing list.
Second we do not come here to help people, we come here because we are
members of a community. We help people because we feel like it not because
we have a duty to.
You are right about one thing though, it is all about perception. Why do
you think people call you help vampire?
···
On 19 February 2013 20:35, Love U Ruby <lists@ruby-forum.com> wrote:
It is about the perception of the group. Not the individual. The more you behave the way you do, the more the group will perceive you as a help vampire. Tho, after seeing the rest of your responses to this thread, the more you come off like a troll. Keep up the good work.
···
On Feb 19, 2013, at 12:35 , Love U Ruby <lists@ruby-forum.com> wrote:
Ryan Davis wrote in post #1097840:
On Feb 19, 2013, at 6:46, Love U Ruby <lists@ruby-forum.com> wrote:
Really never thought about to "steal" your time, no intention of that. I
just asked you guys as you are expert. Just give me a tips or trick ...
That's enough, I will dig into that. Please don't tell that way;You are
educated on this, thus asked. And another person also trying to be fit
on your domain, Is it bad?
Yes, the way you do it IS bad. You are a help vampire:
Firstly this is not a forum but a mailing list.
Second we do not come here to help people, we come here because we are
members of a community. We help people because we feel like it not
because
we have a duty to.
You are right about one thing though, it is all about perception. Why do
you think people call you help vampire?
Leave it. Answering such cheap things seems to me really time wastage.
"And be remember - a just brown tree welcomes people who are giving
water at it's root, but never disrespect who are not."
~~~ First time I am seeing this community such bad mentalities of
people. It seems I am asking money from their accounts. I am asking to
share their tips if any, but ........ have no words.
Thanks
···
On 19 February 2013 20:35, Love U Ruby <lists@ruby-forum.com> wrote:
You are asking for their time which is a commodity that can never be got
back. If I spend money I can just earn some more, the time I spend here is
lost when it passes.
I commute 5 hours a day, I work 8 hours a day, I sleep 7 hours a day. Do
the maths
Just replying to this post will take around 10 to 15 minutes as I stop,
rewrite, reedit, reread repeatedly.
Just because we give freely does not mean it is worthless and it is
certainly not cheap.
···
On 19 February 2013 21:22, Love U Ruby <lists@ruby-forum.com> wrote:
~~~ First time I am seeing this community such bad mentalities of
people. It seems I am asking money from their accounts. I am asking to
share their tips if any, but ........ have no words.
Always interesting when people bring out the proverbs
Leave it. Answering such cheap things seems to me really time wastage.
"And be remember - a just brown tree welcomes people who are giving
water at it's root, but never disrespect who are not."
Are you sure you grasp which role you are in the proverb at the moment? The
next paragraph would seem to indicate otherwise.....
~~~ First time I am seeing this community such bad mentalities of
people. It seems I am asking money from their accounts. I am asking to
share their tips if any, but ........ have no words.
Not very respectful of those not "giving water".
Going back to your question - shocking what the words "splat ruby" might
bring someone as a first hit.
John
···
On Tue, Feb 19, 2013 at 1:22 PM, Love U Ruby <lists@ruby-forum.com> wrote:
~~~ First time I am seeing this community such bad mentalities of
people. It seems I am asking money from their accounts. I am asking to
share their tips if any, but ........ have no words.
You are asking for their time which is a commodity that can never be got
back. If I spend money I can just earn some more, the time I spend here
is
These all are vague.
Then how should I call "Google" who keep sharing the knowledge to
everyone "FREE", how would you consider "YouTube" who does the same job.
How would you consider the the man : "David A. Black" writer of "The
Well-Grounded Ruby". Go to the link: and see how is he redelivering all
his speech what he already mentioned in his book and "YouTube" giving us
it FREE : http://www.youtube.com/watch?v=Xt6c6r4fbBs
So in simple sentence it is depends upon people mentality, who felt
disturbed when he shouldn't but he can obviously. But in such a case
don't need to be keep shouting. If you love to share knowledge share
it,otherwise keep quite. Don't try to assemble a group of like you.
Its not about help,not about money, only about dedications... then you
don't have. --- Thanks
···
On 19 February 2013 21:22, Love U Ruby <lists@ruby-forum.com> wrote:
Always interesting when people bring out the proverbs
~~~ First time I am seeing this community such bad mentalities of
people. It seems I am asking money from their accounts. I am asking to
share their tips if any, but ........ have no words.
Not very respectful of those not "giving water".
Your catch is wrong, so I am helpless.
···
On Tue, Feb 19, 2013 at 1:22 PM, Love U Ruby <lists@ruby-forum.com> > wrote: