rggen-default-register-map 0.33.0 → 0.33.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: c2fcba848943bcea3fcb9a11fea7eea0da0818d97a2bb4f2b1bd1889f78083e6
4
- data.tar.gz: 14d072446eb76d25100b57b7b84a54a1e6d7d8695b89fb2e6456f9ea0a6fd4dc
3
+ metadata.gz: a77cc6528b188fdba713bc53da996cd989418ece9343d890c7faa172f00c5578
4
+ data.tar.gz: fc29e6151495e5ccf4b5c849b85bf9826e9b29cc3eceaa8a6cf9d721263d72f0
5
5
  SHA512:
6
- metadata.gz: 9770d8cab49c4a78f7c627760e306a74ada4246f2328742ee4f0c44a9b771e0601896724a13c834ab9d18853bc92b8b136b1a1b3cdde8c6bb93832ec3c9d1827
7
- data.tar.gz: 7d0631ec3faa746ac88d61326b811e73ea07c7efbf8dad2fb3cbe1a18cb37d415cc349ba2cc477756948bc4c9c5df4eb0344fe3d0cf3fdb5f2869d7d043403be
6
+ metadata.gz: '0318e9214520a542bd889a3745ca936330af5f374a7029d608f2f6164d22a0408317c945e8d809962fe074649b707f61966e401ae0fdd82b34b20c296b5adb03'
7
+ data.tar.gz: d80c8f695c32449b9744bf59eb390854de35dfc735d9d5fe8e47695bf509310bd6341f426c889c1badd0fb2eb7382ec0cb55e364c0fd2a6dbc093aef69bed265
@@ -85,10 +85,10 @@ RgGen.define_simple_feature(:bit_field, :bit_assignment) do
85
85
  end
86
86
 
87
87
  def preprocess(value)
88
- if hash?(value)
89
- value
90
- elsif match_bit_assignment?(value)
91
- split_match_data(match_data)
88
+ case value
89
+ when method(:hash?) then value
90
+ when method(:integer?) then { variable_key(0) => value }
91
+ when method(:match_bit_assignment?) then split_match_data(match_data)
92
92
  else
93
93
  error "illegal input value for bit assignment: #{value.inspect}"
94
94
  end
@@ -99,14 +99,14 @@ RgGen.define_simple_feature(:bit_field, :bit_assignment) do
99
99
  # * https://bugs.ruby-lang.org/issues/19273
100
100
  # * https://github.com/rggen/rggen/issues/129#issuecomment-1366666885
101
101
  def match_bit_assignment?(value)
102
- match_pattern(value) && value.count(':') <= 3
102
+ string?(value) && match_pattern(value) && value.count(':') <= 3
103
103
  end
104
104
 
105
105
  def split_match_data(match_data)
106
106
  match_data
107
107
  .to_s
108
108
  .split(':')
109
- .map.with_index { |value, i| [variable_key(i), value] }
109
+ .map.with_index { |v, i| [variable_key(i), v] }
110
110
  .to_h
111
111
  end
112
112
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RgGen
4
4
  module DefaultRegisterMap
5
- VERSION = '0.33.0'
5
+ VERSION = '0.33.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen-default-register-map
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.33.0
4
+ version: 0.33.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taichi Ishitani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-22 00:00:00.000000000 Z
11
+ date: 2024-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facets
@@ -108,8 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
- rubygems_version: 3.5.3
111
+ rubygems_version: 3.5.5
112
112
  signing_key:
113
113
  specification_version: 4
114
- summary: rggen-default-register-map-0.33.0
114
+ summary: rggen-default-register-map-0.33.1
115
115
  test_files: []