evt-virtual 2.1.0.0 → 2.1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/virtual/pure_method.rb +4 -3
- data/lib/virtual/virtual_method.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c36a981db81c8a89d7512dc367dce98d2602e7fbf66a247ebee9ace0878ff560
|
4
|
+
data.tar.gz: 28388f60c3efbcdced0986c36f4cea9da4369a3cd0deb103f42d9cdcb5a60653
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03636bbd14d687e7ffd7909128366ee0d4ee550ece6bdbdc185a6b8b3b94d00c879cd63edd2b282328cca920562ced102bd6ebcb829656fe297f5e4770ffdafa
|
7
|
+
data.tar.gz: b320530f626e41d760c028ce572f9a2a85ea2ca773fb5ff945ea336ed7037b4bddf0959abd7ff9d55e34dafc373ac9b0c123bd5d0d71e62b9f10b50a6a2e051d
|
data/lib/virtual/pure_method.rb
CHANGED
@@ -3,9 +3,10 @@ module Virtual
|
|
3
3
|
Error = Class.new(RuntimeError)
|
4
4
|
|
5
5
|
def self.define(target_class, method_name)
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
## Re-enable when possible. Caused regressions in core libraries - Scott, Tue Jan 10 2022
|
7
|
+
# if target_class.method_defined?(method_name)
|
8
|
+
# raise Error, "#{target_class} already has an implementation of the #{method_name} method"
|
9
|
+
# end
|
9
10
|
|
10
11
|
target_class.send(:define_method, method_name) do |*args|
|
11
12
|
raise Error, "Pure virtual (abstract) method #{method_name} of #{self.class.name} must be implemented"
|
@@ -3,9 +3,10 @@ module Virtual
|
|
3
3
|
Error = Class.new(RuntimeError)
|
4
4
|
|
5
5
|
def self.define(target_class, method_name, &blk)
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
## Re-enable when possible. Caused regressions in core libraries - Scott, Tue Jan 10 2022
|
7
|
+
# if target_class.method_defined?(method_name)
|
8
|
+
# raise Error, "#{target_class} already has an implementation of the #{method_name} method"
|
9
|
+
# end
|
9
10
|
|
10
11
|
blk ||= proc do |*|
|
11
12
|
end
|