wxruby3 0.9.0.pre.beta.13 → 0.9.0.pre.beta.14

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: 645bdec8f3a721e4e68f128f2cacb72c9b7914e75a53deacec175eccda97383e
4
- data.tar.gz: 593fd0f67994779741e55272bb3d72c8c3111f87f8f0138ff5dcd545908deb52
3
+ metadata.gz: 5e6a85a400700ba48119fc656cf79208b3f5f603eaafb01d30206de46876dbf1
4
+ data.tar.gz: ffe7e7cde7840f547efe45893162bfc54e2bd9402d7aaf975a98f298fbdbdf8e
5
5
  SHA512:
6
- metadata.gz: 62ae88eea950c8e3914d35095e8d18d8ff0bb6f33a6ae6dbd8dca292a6ff9f09329da82803425461f00942495ec4401faf20a1f69fc12e1c8636c2a2320590b7
7
- data.tar.gz: feee980c9c1d19d5942e70871a1541d5518b1bd175ccfc7ea93e8edc93760a8962b156aa8cc7ef8bdbbb32741504e35d90124770c8a6e11a7f2817fb16ba7792
6
+ metadata.gz: 86dc10b04a49bd56825267b23117720fa5b2398cb01194cdd050fa9d8f6c81ba5a80426447a82fa747a725cdb1802bc0138ebd43322c7c162104a14c5a71ebb3
7
+ data.tar.gz: e9aa356d29c7d571f68a99dbd33041aed71d770951cca3d32a37b5eab634da938b9da931dad7fefafb67ad33401535357c27db647798e764abdd0def4133f09a
data/lib/wx/accessors.rb CHANGED
@@ -56,8 +56,14 @@ module WxRubyStyleAccessors
56
56
 
57
57
  def self.included(mod)
58
58
  mod.extend WxRubyStyleAccessors
59
- mod.constants.collect { | c | mod.const_get(c) }.grep(Module).each do |mod|
60
- mod.include WxRubyStyleAccessors if mod.name.start_with?('Wx::') # only setup Wx namespace
59
+ org_verbose = $VERBOSE
60
+ begin
61
+ $VERBOSE = nil
62
+ mod.constants.collect { | c | mod.const_get(c) }.grep(Module).each do |mod|
63
+ mod.include WxRubyStyleAccessors if mod.name.start_with?('Wx::') # only setup Wx namespace
64
+ end
65
+ ensure
66
+ $VERBOSE = org_verbose
61
67
  end
62
68
  end
63
69
  end
@@ -7,24 +7,30 @@ module WxGlobalConstants
7
7
  def search_nested(mod, sym, path = [])
8
8
  # check any nested modules and/or (enum) classes
9
9
  const_val = nil
10
- mod.constants.each do |c|
11
- case cv = mod.const_get(c)
12
- when ::Class
13
- if cv < Wx::Enum
14
- # the only thing of interest in Enum classes are the enum values
15
- const_val = cv[sym]
16
- elsif cv.name.start_with?('Wx::') # only search Wx namespace
17
- # prevent const_missing being triggered here since that may lead to unexpected results
18
- const_val = cv.const_get(sym) if cv.constants.include?(sym)
19
- const_val = search_nested(cv, sym, path+[mod]) unless const_val || path.include?(cv)
20
- end
21
- when ::Module
22
- if cv.name.start_with?('Wx::') # only search Wx namespace
23
- const_val = cv.const_get(sym) if cv.constants.include?(sym)
24
- const_val = search_nested(cv, sym, path+[mod]) unless const_val || path.include?(cv)
25
- end
26
- end unless mod == cv # watch out for infinite recursion
27
- break if const_val
10
+ org_verbose = $VERBOSE
11
+ begin
12
+ $VERBOSE = nil
13
+ mod.constants.each do |c|
14
+ case cv = mod.const_get(c)
15
+ when ::Class
16
+ if cv < Wx::Enum
17
+ # the only thing of interest in Enum classes are the enum values
18
+ const_val = cv[sym]
19
+ elsif cv.name.start_with?('Wx::') # only search Wx namespace
20
+ # prevent const_missing being triggered here since that may lead to unexpected results
21
+ const_val = cv.const_get(sym) if cv.constants.include?(sym)
22
+ const_val = search_nested(cv, sym, path+[mod]) unless const_val || path.include?(cv)
23
+ end
24
+ when ::Module
25
+ if cv.name.start_with?('Wx::') # only search Wx namespace
26
+ const_val = cv.const_get(sym) if cv.constants.include?(sym)
27
+ const_val = search_nested(cv, sym, path+[mod]) unless const_val || path.include?(cv)
28
+ end
29
+ end unless mod == cv # watch out for infinite recursion
30
+ break if const_val
31
+ end
32
+ ensure
33
+ $VERBOSE = org_verbose
28
34
  end
29
35
  const_val
30
36
  end
data/lib/wx/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wx
2
- WXRUBY_VERSION = '0.9.0-beta.13'
2
+ WXRUBY_VERSION = '0.9.0-beta.14'
3
3
  end
@@ -24,7 +24,7 @@ module WXRuby3
24
24
  def handle_module(mod, table)
25
25
  mod.constants.each do |c|
26
26
  a_const = mod.const_get(c)
27
- if ::Module === a_const || ::Class === a_const # Package submodule or Class (possibly Enum)
27
+ if (::Module === a_const || ::Class === a_const) && a_const.name.start_with?('Wx::') # Wx:: Package submodule or Class (possibly Enum)
28
28
  handle_module(a_const, table[c.to_s] = {})
29
29
  elsif Wx::Enum === a_const
30
30
  table[c.to_s] = { type: a_const.class.name.split('::').last, value: "\#{a_const.class}.new(\#{a_const.to_i})" }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wxruby3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0.pre.beta.13
4
+ version: 0.9.0.pre.beta.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Corino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-21 00:00:00.000000000 Z
11
+ date: 2023-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri