aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 23:54:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 23:54:17 +0000
commit9363c82d8796a9e498b7feeb1c1c561b4bc1d7a9 (patch)
tree7fbab50bca04b3a6d2610769d641d154f14dd7d5 /lib
parenta9b6ac34f7f23a57159e067cb57a37220210a4b1 (diff)
downloadruby-9363c82d8796a9e498b7feeb1c1c561b4bc1d7a9.tar.gz
e2mmap.rb: suppress a warning
* lib/e2mmap.rb (bind): eval with the location. undefine predefined method before overwriting to suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/e2mmap.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/e2mmap.rb b/lib/e2mmap.rb
index bbff4f8c2e..e9cbd6a63d 100644
--- a/lib/e2mmap.rb
+++ b/lib/e2mmap.rb
@@ -62,16 +62,20 @@ module Exception2MessageMapper
end
def bind(cl)
- self.module_eval %[
+ self.module_eval "#{<<-"begin;"}\n#{<<-"end;"}", __FILE__, __LINE__+1
+ begin;
def Raise(err = nil, *rest)
Exception2MessageMapper.Raise(self.class, err, *rest)
end
alias Fail Raise
+ class << self
+ undef included
+ end
def self.included(mod)
mod.extend Exception2MessageMapper
end
- ]
+ end;
end
# Fail(err, *rest)