kanrisuru 0.7.0 → 0.7.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: bb8de477e2168c782b7cb082a6a6760fd56aa6925f1820ee80e45baff76a7b27
4
- data.tar.gz: ad21e0b9787a2e42d8626a367f11b44ff97ec27f000a6ec8f7967d7b22da066d
3
+ metadata.gz: 93755393c0e2f4b2353bdd4bda27df54e4aceccf3ae7cd6d77f0e4cbc8c908c7
4
+ data.tar.gz: f28c287f77b9edcb505e319030d67fc51287b99dc23cc0903fcfcb7dcec8c52c
5
5
  SHA512:
6
- metadata.gz: 0cdeb2cda038612234429eb9ca172f294f60bb8bdcb0d5db2490231dfc4ab4205ae240b3f8ef8ebab41b5de6ef9d2599c7db76dd0ebe229b8b896e3a831c8805
7
- data.tar.gz: b32d4fe02fe5897a8f56d827290516ceb393db63068f9cba3a4396b79e667dd62a332013fbb6fe674cd680ccd374faff877441f92f57048d5b782e244b23ec20
6
+ metadata.gz: 493e8a9019139f5326e50b2ade2ef1f5c631bec796fc08655455e356b0718ce41f5e34d1b348cc88f8f6c1f6857a56ed36dff30c56f285866c525ed07500b342
7
+ data.tar.gz: 4b4a6141a7bbc4731c6693639071470291881876589ee8033195d3f9e32a13fd6bad444ccfd2cf8bf1f5d302c93b3a09d6cf2e32ecda42fef954c2d2a93595d6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## Kanrisuru 0.7.1 (August 8, 2021) ##
2
+ * Fix bug with `os_include` when caching namespace unbound methods, use the namespace in the
3
+ cache key to avoid any namespace collisions with the same method name, namely:
4
+ ```ruby
5
+ "#{namespace}.#{method_name}"
6
+ ```
7
+
1
8
  ## Kanrisuru 0.7.0 (August 8, 2021) ##
2
9
  * Simplify `FileInfo` struct for return object of `ls` command.
3
10
  * Rename `size` to `fsize` for the `OpenFile` struct to avoid method naming conflicts of the struct class.
@@ -168,8 +168,8 @@ module Kanrisuru
168
168
  define_method method_name do |*args, &block|
169
169
  unbound_method = nil
170
170
 
171
- if os_method_cache.key?(method_name)
172
- unbound_method = os_method_cache[method_name]
171
+ if os_method_cache.key?("#{namespace}.#{method_name}")
172
+ unbound_method = os_method_cache["#{namespace}.#{method_name}"]
173
173
  else
174
174
  host = namespace_instance.instance_variable_get(:@host)
175
175
 
@@ -185,7 +185,7 @@ module Kanrisuru
185
185
 
186
186
  ## Cache the unbound method on this host instance for faster resolution on
187
187
  ## the next invocation of this method
188
- os_method_cache[method_name] = unbound_method
188
+ os_method_cache["#{namespace}.#{method_name}"] = unbound_method
189
189
  end
190
190
 
191
191
  ## Bind the method to host instance and
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kanrisuru
4
- VERSION = '0.7.0'
4
+ VERSION = '0.7.1'
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -4,7 +4,6 @@ require 'simplecov'
4
4
  SimpleCov.start
5
5
 
6
6
  require 'kanrisuru'
7
-
8
7
  require_relative 'helper/test_hosts'
9
8
 
10
9
  Kanrisuru.logger.level = Logger::WARN
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanrisuru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Mammina
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-08 00:00:00.000000000 Z
11
+ date: 2021-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec