core-global 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e10aa803e80d134b52ff4e7fb1fd46361d19611bd3e3b924a8d8f5831de1603
4
- data.tar.gz: 2dffdef614b59d87857e9e20f2714c4f91f7422b52361ecfc194f6a6b3ea9fe3
3
+ metadata.gz: f227f1ec22cfa182eddcae586000e2c402a9186ff16bed50706047f698053b2d
4
+ data.tar.gz: 2388109d4402a3dd6a85e3624a1f43b6e0afa9be305287a2698c5ed93958c50c
5
5
  SHA512:
6
- metadata.gz: 4fb956068a106d07d3005c881a9356d7d3dd425c09f6c28c3fa5c3bdddf262eed9003b9fb2a5b1ab09440afa78c4459a7b62bff889082971d473420cb27498b4
7
- data.tar.gz: 7ace62e97585984ef2d64d336232f4eaee7e21531b2976732584a5c7b7d8fb6d54284a8a2e4d0d470541efaa3defac5881810746e0cddb53c0e5591e374c0af8
6
+ metadata.gz: 8ebe6500d6d167b0034afb4861609cd576e9c3ac3b769e0b7fcc3a627cc15d4e6c1f89a5444eee595d6ecf586293a315604293b60c0a446ae2c32467f752c5db
7
+ data.tar.gz: 62719b2f0ac50d2a5cb7030b34f17aafd87b4893d6f87ff2c90de5deea9ab035266594c13d56e64346ec78d2591d9a5d8a4a69552fffb33dd00b5bcc267781ec
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [v0.0.1](https://github.com/metabahn/corerb/releases/tag/2021-06-01)
2
+
3
+ *released on 2021-06-01*
4
+
5
+ * `fix` [#35](https://github.com/metabahn/corerb/pull/35) Correctly delegate method_missing in global instances ([bryanp](https://github.com/bryanp))
6
+
1
7
  ## [v0.0.0](https://github.com/metabahn/corerb/releases/tag/2021-02-10)
2
8
 
3
9
  *released on 2021-02-10*
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Core
4
4
  module Global
5
- VERSION = "0.0.0"
5
+ VERSION = "0.0.1"
6
6
 
7
7
  def self.version
8
8
  VERSION
data/lib/is/global.rb CHANGED
@@ -29,22 +29,28 @@ module Is
29
29
  end
30
30
 
31
31
  extends :class, prepend: true do
32
+ def method_added(name)
33
+ if instance_variable_defined?(:@__finalized)
34
+ remove_instance_variable(:@__finalized)
35
+ end
36
+
37
+ super
38
+ end
39
+
32
40
  def method_missing(name, *args, &block)
33
- if public_instance_methods(false).include?(name)
41
+ unless defined?(@__finalized)
34
42
  finalize
35
-
36
- global.public_send(name, *args, &block)
37
- else
38
- super
39
43
  end
44
+
45
+ global.public_send(name, *args, &block)
40
46
  end
41
47
 
42
48
  if Module.private_method_defined?(:ruby2_keywords)
43
49
  ruby2_keywords(:method_missing)
44
50
  end
45
51
 
46
- def respond_to_missing?(name, *)
47
- public_instance_methods(false).include?(name) || super
52
+ def respond_to_missing?(*args)
53
+ global.respond_to_missing?(*args)
48
54
  end
49
55
  end
50
56
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: core-global
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Powell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-10 00:00:00.000000000 Z
11
+ date: 2021-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: core-extension
@@ -47,14 +47,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
47
47
  requirements:
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 2.5.0
50
+ version: 2.6.7
51
51
  required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  requirements: []
57
- rubygems_version: 3.2.4
57
+ rubygems_version: 3.2.15
58
58
  signing_key:
59
59
  specification_version: 4
60
60
  summary: Patterns for responsible global state.