kanrisuru 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/kanrisuru/os_package.rb +3 -3
- data/lib/kanrisuru/version.rb +1 -1
- data/spec/spec_helper.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93755393c0e2f4b2353bdd4bda27df54e4aceccf3ae7cd6d77f0e4cbc8c908c7
|
4
|
+
data.tar.gz: f28c287f77b9edcb505e319030d67fc51287b99dc23cc0903fcfcb7dcec8c52c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/lib/kanrisuru/os_package.rb
CHANGED
@@ -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
|
data/lib/kanrisuru/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2021-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|