diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-07-29 00:31:52 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-07-30 19:03:18 +0900 |
commit | b2d96abb42abbe2e01f010ffc9ac51f0f9a50002 (patch) | |
tree | 57791da8a71280c335109916376e13f5e0c63af3 /lib/delegate.rb | |
parent | cfbae7dae052180e5dde05a27948ae8d779eccab (diff) |
Extract version number from the source
"requiring version.rb" strategy has some issues.
- cannot work when cross-compiling
- often introduces wrong namespace
- must know the superclasses
- costs at each runtime than at build-time
etc.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3375
Diffstat (limited to 'lib/delegate.rb')
-rw-r--r-- | lib/delegate.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/delegate.rb b/lib/delegate.rb index a1fded6425..cf8d39a982 100644 --- a/lib/delegate.rb +++ b/lib/delegate.rb @@ -39,6 +39,8 @@ # Be advised, RDoc will not detect delegated methods. # class Delegator < BasicObject + VERSION = "0.1.0" + kernel = ::Kernel.dup kernel.class_eval do alias __raise__ raise |