Method called on terminated object

test.rb:

class << Module
public
def abcdefg
end
end

#ruby test.rb
test.rb:2: method `public’ called on terminated object
(0x35cc8) (NotImplementedError)

as well with ‘private’ and ‘protected’.
Affected on ‘Module’ and ‘Object’ class.
Is this intentional? (or I’m the only one being bitten)

ruby 1.7.3 (2002-09-27)

···


Ariff
MyBSD Malaysia.
ariff@MyBSD.org.my
skywizard@time.net.my
http://staff.mybsd.org.my/skywizard
http://www.mybsd.org.my

Wait, wait, what do you want to accomplish there? Although you don’t get
a syntax error, I think probably you have a semantic error.

Regards,

Bill

···

========================================================================
Ariff Abdullah skywizard@time.net.my wrote:

test.rb:

class << Module
public
def abcdefg
end
end

#ruby test.rb
test.rb:2: method `public’ called on terminated object
(0x35cc8) (NotImplementedError)

as well with ‘private’ and ‘protected’.
Affected on ‘Module’ and ‘Object’ class.
Is this intentional? (or I’m the only one being bitten)

ruby 1.7.3 (2002-09-27)

Hi,

···

In message “method called on terminated object” on 02/09/28, Ariff Abdullah skywizard@time.net.my writes:

class << Module
public
def abcdefg
end
end

#ruby test.rb
test.rb:2: method `public’ called on terminated object
(0x35cc8) (NotImplementedError)

This must be a bug. I will fix.

						matz.

I was toying around with rbbr.rb (Ruby class browser from
ruby-gtk) and accidentally caught there. Remember, that we
can add method on the fly at any time during runtime on
any class/module, right?

class Module
class << self
def abcdefg
print “blabla\n”
jklmn()
end
def jklmn
print “12345\n”
end
private :jklmn
end
end

semantic error? I dont think so…
(or please, enlighten me)

···

On Saturday 28 September 2002 03:25, William Djaja Tjokroaminata wrote:

Wait, wait, what do you want to accomplish there? Although you
don’t get a syntax error, I think probably you have a semantic
error.


Ariff Abdullah
MyBSD Malaysia.
ariff@MyBSD.org.my
skywizard@time.net.my
http://staff.mybsd.org.my/skywizard
http://www.mybsd.org.my

Don’t have much time to dig through the sources, I must be tired.
Got to catch Card Captor Sakura :slight_smile:

thanks anyway…

···

On Saturday 28 September 2002 09:25, Yukihiro Matsumoto wrote:

class << Module
public
def abcdefg
end
end

#ruby test.rb
test.rb:2: method `public’ called on terminated object
(0x35cc8) (NotImplementedError)

This must be a bug. I will fix.

  					matz.


Ariff Abdullah
MyBSD Malaysia.
ariff@MyBSD.org.my
skywizard@time.net.my
http://staff.mybsd.org.my/skywizard
http://www.mybsd.org.my

“Yukihiro Matsumoto” wrote

class << Module
public
def abcdefg
end
end

#ruby test.rb
test.rb:2: method `public’ called on terminated object
(0x35cc8) (NotImplementedError)

This must be a bug. I will fix.

It is probably related to the recent meta-class changes
with ruby 1.7.3 (2002-09-27) [i386-mswin32]

···

class << Object
begin
id
rescue NotImplementedError => $mes
end
class << self
def bla
end
end
p $mes
p id
end

method `id’ called on terminated object (0x279a950)
20763816

/Christoph

Hi,

···

In message “Re: method called on terminated object” on 02/09/28, “Christoph” chr_news@gmx.net writes:

It is probably related to the recent meta-class changes
with ruby 1.7.3 (2002-09-27) [i386-mswin32]

Yes. This is a same bug.

						matz.