[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Reopening a module vs. Module.include

Pit Capitain

8/24/2006 10:10:00 AM

Mark Van Holstyn schrieb:
> I am attempting to create a plugin, with some methods in my own module.
> These would then be included to various pieces of active record. This works
> fine when including them in classes, but when including them in a module,
> the classes which include that module do not get the methods. These classes
> do however get them when directly reopening the module. Is there any way
> around this, or is it best to just reopen the module and define the new
> methods?
> (...)

Mark, this is a known limitation of the current Ruby implementation. It
has been discussed on the mailing lists. The only workaround I know is
to re-include the module:

class B
include A
end

p B.new.test_two # => "test_two"

Regards,
Pit

2 Answers

Kirby Grant

4/1/2013 12:57:00 PM

0


On 30-Mar-2013, "jwalker" <jwalker@gmail.com>.alt.fan.rush-limbaugh
regurgitated:
Re: Here's more Truth of America's founding on moral bedrock

> Kirby Grant wrote:
>
> >
> > On 29-Mar-2013, "Lee L. Curtis" <cleetis@gmail.com> expressed a
> > parochial opiion:
> >
> > > Kirby Grant wrote:
> > >
> > > >
> > > > On 29-Mar-2013, "Slackjaw" <Captain@OklahomaSpaceAlliance.com>
> > > > expressed a parochial opiion:
> > > >
> > > > > Kirby Grant wrote:
> > > > >
> > > > > >
> > > > > > On 28-Mar-2013, "Slackjaw" <Captain@OklahomaSpaceAlliance.com>
> > > > > > expressed a parochial opiion:
> > > > > >
> > > > > -
> > > > > > > > So as long as you Republicans/conservatives keep
> > > > > > > > acting dumb I will need to talk in terms as simple as
> > > > > > > > possible because you have proven that you cannot
> > > > > > > > understand more complex arguments.
> > > > > > >
> > > > > > > Hey Kirby, why don't you start posting at your own
> > > > > > > intellectual level for a while? I'm curious to see what a
> > > > > > > post from someone as smart as Einstein would look like.
> > > > > > >
> > > > > >
> > > > > > But then it would be beyond your capability to understand. I
> > > > > > write in a manner that makes it clear that I am insulting you
> > > > > > and your other blithering idiot friends.
> > > > >
> > > > > No, seriously, go ahead. I'd like to see you post something I
> > > > > couldn't understand.
> > > > >
> > > > >
> > > >
> > > > I am god.
> > >
> > > Well, I can understand it: you're nuts.
> > > >
> >
> > No. I am not. But it does show that you simply have no capacity to
> > understand things that occur at a higher level than your gutter-based
> > thinking.
>
> Perhaps you can provide some proof of your statement that you are god,
> like a large Swiss bank account in my name.
>
>

I made you write an incredibly asinine and stupid response didn't I? Now
that's power.

Kirby Grant

4/1/2013 1:05:00 PM

0


On 30-Mar-2013, "Lee L. Curtis" <cleetis@gmail.com>.alt.fan.rush-limbaugh
regurgitated:
Re: Here's more Truth of America's founding on moral bedrock

> Kirby Grant wrote:
>
> >
> > On 29-Mar-2013, "Lee L. Curtis"
> > <cleetis@gmail.com>.alt.fan.rush-limbaugh regurgitated:
> > Re: Here's more Truth of America's founding on moral bedrock
> >
> > > Kirby Grant wrote:
> > >
> > > >
> > > > On 29-Mar-2013, Obama's Legion of Flash Mobs @ 7/11.nig expressed
> > > > a parochial opiion:
> > > >
> > > > > On Fri, 29 Mar 2013 13:07:41 GMT, "Kirby Grant"
> > > > > <KGrant@gmail.com> wrote:
> > > > >
> > > > > >
> > > > > > On 28-Mar-2013, "Slackjaw" <Captain@OklahomaSpaceAlliance.com>
> > > > > expressed
> > > > > > a
> > > > > > parochial opiion:
> > > > > >
> > > > > >> Kirby Grant wrote:
> > > > > > >
> > > > > >> >
> > > > > >> > On 28-Mar-2013, Salty Stan <wsjames123@gmail.com>
> > > > > expressed a >> > parochial opiion:
> > > > > >> >
> > > > > >> > > On Mar 28, 11:22 am, Obama's Legion of Flash Mobs @
> > > > > 7/11.nig wrote: >> > > > On Wed, 27 Mar 2013 03:34:00 GMT,
> > > > > "Kirby Grant" >> > > <KGr...@gmail.com>
> > > > > >> > > > wrote:
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > >
> > > > > >> > > > > On 26-Mar-2013, expressed a parochial opiion:
> > > > > >> > > >
> > > > > >> > > > >> > > You do know the difference between knowledge and
> > > > > >> > > > intelligence?
> > > > > >> > > >
> > > > > >> > > > >> > Intelligence is actually just a cheap parlor
> > > > > trick. >> > > >
> > > > > >> > > > >> Indeed?! Sounds like sour grapes to me. It is easy
> > > > > to >> > > > disparage that >> which we don't have.
> > > > > >> > > >
> > > > > >> > > > > Why is it that I am so good at making Republicans
> > > > > look like >> > > > > stupid idiots.
> > > > > >> > > > > It must be a gift - either that or it is extremely
> > > > > low-hanging >> > > > > fruit.
> > > > > >> > > >
> > > > > >> > > > > I have typically placed in the upper 2% of every
> > > > > intelligence >> > > > > test that has
> > > > > >> > > > > ever been given to me. Early in my life my teachers
> > > > > were >> > > > > frustrated at me
> > > > > >> > > > > because I never performed at the level they know I
> > > > > was capable >> > > > > of. But there
> > > > > >> > > > > was little they could do about it. In college they
> > > > > would have >> > > > > fast tracked
> > > > > >> > > > > me to tenured professor if only I would have stayed
> > > > > on and >> > > > > pursued doctoral
> > > > > >> > > > > studies but I chose to pursue a technical career
> > > > > instead of >> > > > > academia. For
> > > > > >> > > > > you to accuse me of not having intelligence is for
> > > > > you to show >> > > > > just how much
> > > > > >> > > > > you really don't have at all and demonstrates your
> > > > > abject >> > > > > ignorance about
> > > > > >> > > > > what it means to be intelligent in the first place.
> > > > > >> > >
> > > > > >> > > Not to dispute your claim that you "beat" all these
> > > > > intelligence >> > > tests (how many were there, again?) but if
> > > > > you were really in the >> > > top 2% of the bell curve, why do
> > > > > you post the way you do? >> > >
> > > > > >> >
> > > > > >> > First of all I have to dumb down the message because it is
> > > > > directed >> > at
> > > > > >> > Republicans. Until and unless Republicans start becoming
> > > > > smarter and >> > actually use their brains to think, more
> > > > > sophisticated messages are a >> > waste of time. Republicans
> > > > > have proven that they are not capable of >> > phrasing any
> > > > > issue except in ways that are handed to them by the >> >
> > > > > talking heards of the RNC and other conservative spokesmen. If
> > > > > those >> > sources insisted that the ocean is yellow,
> > > > > conservatives would start >> > posting a string of message
> > > > > telling everyone that the ocean is yellow >> > and that it
> > > > > cannot be disputed. This is EXACTLY what they are doing >> >
> > > > > with the gun control discussion. This is EXACTLY what they are
> > > > > doing >> > with the gay marriage issue. This is EXACTLY what
> > > > > they are doing with >> > the immigration issue. This is
> > > > > EXACTLY how they are trying to perform >> > character
> > > > > assassination of President Obama. If the talking heads had >> >
> > > > > disavowed the "birther" discussion the day after it first came
> > > > > out, >> > it never would have grown feet and walked. The
> > > > > talking heads knew it >> > was a fallacious argument, but they
> > > > > saw an advantage in getting >> > people to follow that totally
> > > > > foolish path. So as long as you >> > Republicans/conservatives
> > > > > keep acting dumb I will need to talk in >> > terms as simple as
> > > > > possible because you have proven that you cannot >> >
> > > > > understand more complex arguments.
> > > > > > >
> > > > > >> Hey Kirby, why don't you start posting at your own
> > > > > intellectual level >> for a while? I'm curious to see what a
> > > > > post from someone as smart as >> Einstein would look like.
> > > > > > >
> > > > > >
> > > > > > But then it would be beyond your capability to understand. I
> > > > > > write in a manner that makes it clear that I am insulting you
> > > > > > and your other blithering
> > > > > > idiot friends.
> > > > >
> > > > > I know about a dozen Liberal Arts' majors who wouldn't know how
> > > > > to change a light bulb but sure know how to pick out fingernail
> > > > > polish.
> > > > >
> > > > > I'm glad you were able to learn a skill which your boss rewards
> > > > > you handsomely. Union thugs like Obama have to blackmail
> > > > > employers with threats of strike or flash mob demonstrations to
> > > > > get what's owed them through 'social justice'.
> > > > >
> > > > > What percent of Liberal Arts' degrees do you suppose the OWS/99%
> > > > > habs and can't get a job because they've been taught advanced
> > > > > basket weaving rather than real world skills?
> > > >
> > > > No. You really don't know people like that. You just made that up
> > > > because you think you can get away with it. But since you cannot
> > > > prove that you know such people you end up being an immoral,
> > > > unethical liar - which is typical of conservatives.
> > > >
> > > > While I do have a liberal arts degree, I work in a technical
> > > > profession. I'm a self-taught computer programmer. My liberal arts
> > > > degree taught me how to learn. After that it was just a matter of
> > > > applying the skill of learning to become a programmer. If other
> > > > people don't use the skills they have to develop other skills,
> > > > then that is their fault. I'm not accountable for them. I decided
> > > > to be successful in a career and it turns out I am.
> > > >
> > > > Just two days ago I ended up being noticed by the upper levels of
> > > > my company because there was a crisis with one of our customers
> > > > and after everyone else who had been contacted said they didn't
> > > > know how to fix the problem (it was with an older version of a
> > > > program that we haven't actively supported in years) they finally
> > > > came to me and I said I'd take care of it and in just a couple
> > > > hours I had the program working again. All because I made the
> > > > decision that I would take the chance on failing instead of
> > > > saying I wouldn't even try. The VPs were pretty happy when I
> > > > reported that the problem was solved. Of course this is nothing
> > > > new for me - I've been doing things like this my whole career.
> > > > I'm always the last person they turn to because there is no need
> > > > for anyone else to get involved once they pass a problem to me.
> > > > That has keep me very employable over the years. All with a
> > > > liberal arts degree.
> > >
> > > It took you hours to solve that problem? That's pathetic, I solve
> > > issues like that in minutes!
> > >
> > > Of course, unlike you, I was smart enough to get a degree in
> > > Information and Computer Science. Whatever company you work for
> > > must be desperate if it has to hire liberal art majors to do its
> > > technical work. Only the super-intelligent can do the job I do,
> > > that's why I can demand and get the big bucks.
> > >
> > > --
> >
> > You phony. I never described the exact problem. You would have been
> > at an utter loss to fix the problem because you've never seen a
> > program quite like the one I fixed. On top of that, I am the person
> > who was hired by my company, not you. That means they value my
> > services far more than they do yours.
>
> I doubt they could afford me. If they are reduced to hiring liberal
> arts majors instead of real developers then they must not be able to
> afford much.
>
> > I doubt they would even look at
> > your resume. In my business unit over 90% of us are over the age of
> > 40. Over 50% over us are above the age of 50.
>
> OMG- what is the company, the old geezer's club? How can you develop
> software? Do you push the mouse with your walker?
>
> > We don't have junior
> > people because we cannot afford to carry them while they learn the
> > business. If we hire someone it is because they got all of their
> > experience elsewhere and were qualified the day they walk through the
> > door. I happened to get hired originally because they needed someone
> > who was a database guru, an experienced assembler/3GL programmer and
> > a unix/windows system administrator all rolled into one and they also
> > liked my mainframe background because they weren't sure at the time
> > whether they might need that.
> >
> > I am Phi Beta Kappa as well as being a Viet Nam veteran.
>
> Whoa, what are you, like 70 years old!? What did you learn to program
> on, an UNIVAC? No wonder it takes you hours to solve a software problem.
>
> The IT world had advanced light-years since programming in machine
> code. We're in the 21st century now, we left you old-timers in the dust
> years ago.
>
> > I also have a
> > resume that left average behind a long time ago. There are other
> > factors that you are neither qualified or authorized to know.
> >
> > You people with IT degrees are basicly uneducated automatons.
>
> Since you aren't smart enough to have an IT degree, you really wouldn't
> know. We young guns have all the latest technology. You need to stand
> aside grandpa, and let us pass; we're streaming ahead at warp speed. We
> can't wait for some old has-been hippie who takes 20 seconds a
> keystroke due to his arthritis. Sorry to be blunt, but you're still
> stuck in the 20th century, we're young and strong, and that's life.
>
> > You
> > can't provide oral presentations, you are incapable of writing decent
> > documentation, you don't have a broad knowledge base, you are
> > completely uncultured.
>
> If you consider getting stoned, having flower children, and going to
> Woodstock as being "cultured" then you've got a point. But I was
> learning leading edge computer technology at the same age that you were
> smoking pot and having "love-ins".
>
> > Basically you got career training, not an
> > education. The majority of presidents of the United States have had
> > liberal arts degrees - not a one of them had a degree in either IT or
> > MIS.
>
> Really? Prove it.
>
> --


When it comes times for lay-offs, your group is the first to go. Why?
Because you don't perform any useful function. You are also easily replaced
by some other young gun who has better ideas than you do. Those of us who
are more mature programmers are not replaceable. We know how internal
systems work. In effect we know where the bodies are buried. There are
certain pieces of information we never write down. You youngsters want to
have endless design and control gate meetings while those of us with real
skills just dive in and do what is needed to get a system going again.

I don't have to prove anything to you. You only need to ask yourself what
you did wrong when it is time to pick up your unemployment check.