1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/base64.rb (Deprecated): super in bound method calls original

name method in stable version.  [ruby-dev:23916]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2004-07-16 06:24:01 +00:00
parent e1ae794e73
commit 56e149c769
2 changed files with 10 additions and 10 deletions

View file

@ -119,16 +119,13 @@ module Base64
module Deprecated # :nodoc:
include Base64
def _deprecated_base64(*args)
m0, m1 = caller(0)
m = m0[/\`(.*?)\'\z/, 1]
warn("#{m1}: #{m} is deprecated; use Base64.#{m} instead")
super
end
dep = instance_method(:_deprecated_base64)
remove_method(:_deprecated_base64)
for m in Base64.private_instance_methods(false)
define_method(m, dep)
module_eval %{
def #{m}(*args)
warn("\#{caller(1)[0]}: #{m} is deprecated; use Base64.#{m} instead")
super
end
}
end
end
end