Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Removing "warning: method redefined"
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brian Takita  
View profile  
 More options Jul 8 2005, 3:29 am
Newsgroups: comp.lang.ruby
From: "Brian Takita" <brian.tak...@gmail.com>
Date: 8 Jul 2005 00:29:16 -0700
Local: Fri, Jul 8 2005 3:29 am
Subject: Removing "warning: method redefined"
Hello,

What is the best way to remove "warning: method redefined" warnings?

Thank you,
Brian Takita


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yukihiro Matsumoto  
View profile  
 More options Jul 8 2005, 4:01 am
Newsgroups: comp.lang.ruby
From: Yukihiro Matsumoto <m...@ruby-lang.org>
Date: Fri, 8 Jul 2005 17:01:38 +0900
Local: Fri, Jul 8 2005 4:01 am
Subject: Re: Removing "warning: method redefined"
Hi,

In message "Re: Removing "warning: method redefined""
    on Fri, 8 Jul 2005 16:30:48 +0900, "Brian Takita" <brian.tak...@gmail.com> writes:

|What is the best way to remove "warning: method redefined" warnings?

$VERBOSE=nil or remove method first by using remove_method.

                                                        matz.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Takita  
View profile  
 More options Jul 8 2005, 11:47 am
Newsgroups: comp.lang.ruby
From: "Brian Takita" <brian.tak...@gmail.com>
Date: 8 Jul 2005 08:47:39 -0700
Local: Fri, Jul 8 2005 11:47 am
Subject: Re: Removing "warning: method redefined"
Thank you for your help.

I would like to keep the warnings on, so I don't see $VERBOSE=nil as a
viable option.

remove_method works for me except when I need to call the super method
in the new definition.

Is there another way to get rid of the warning or to use remove_method
and still be able to use the super method?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yukihiro Matsumoto  
View profile  
 More options Jul 8 2005, 12:25 pm
Newsgroups: comp.lang.ruby
From: Yukihiro Matsumoto <m...@ruby-lang.org>
Date: Sat, 9 Jul 2005 01:25:04 +0900
Local: Fri, Jul 8 2005 12:25 pm
Subject: Re: Removing "warning: method redefined"
Hi,

In message "Re: Removing "warning: method redefined""
    on Sat, 9 Jul 2005 00:50:47 +0900, "Brian Takita" <brian.tak...@gmail.com> writes:

|remove_method works for me except when I need to call the super method
|in the new definition.

warning and remove_method are not related with super.  IIRC, warning
was caused when you replace an existing method without making any
alias to the original.

  class Foo
    def foo
      p :foo
    end
  end
  class Bar < Foo
    def foo
    end
    # warning
    def foo
    end
    # remove foo in Bar
    remove_method :foo
    # no warning
    def foo
      super  # calls foo in Foo
    end
  end
  Bar.new.foo

                                                        matz.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Takita  
View profile  
 More options Jul 8 2005, 12:36 pm
Newsgroups: comp.lang.ruby
From: "Brian Takita" <brian.tak...@gmail.com>
Date: 8 Jul 2005 09:36:14 -0700
Local: Fri, Jul 8 2005 12:36 pm
Subject: Re: Removing "warning: method redefined"
Thank you for your clarification and correction.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google