isomorfeus-preact 23.7.0.rc3 → 23.7.0.rc5

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: 3533a30fac94711e0c98255d37cd5bf8ffb3f0db5f67f4d2b0b18ea94565ba47
4
- data.tar.gz: fd2654f56e5f2608244e31889c4c74cd2da4db7a84d6f441a53a7cf949715bea
3
+ metadata.gz: 47f81aee517d1c616441f8f561a4feb397ba7a01e809118f4f24ca17a09f1de0
4
+ data.tar.gz: d69a7bd7d13b399979f312fcd061eb8497333759281d70fe9650216ceaf83f5c
5
5
  SHA512:
6
- metadata.gz: a82cf0365de27cccd74c76d402d826b8b083b5cbd7243bcd11b2fd53ea62105214f1cd6cc1d1987f6305da4f1ae7d5f116199daee339ea48a43cab1e719c7be9
7
- data.tar.gz: 286228aec98baed80ae89be0c093b12937869027cc2aa1a0cedd94d6eb7c728303df5df3a5197dc52f4eb85b139741a77e9e7576301ad22c9936c49a35ac3dbb
6
+ metadata.gz: b545debe82c2026413a8faaaa06894ef160db01116b6e66c3c63c03b61cb31e1caa93e53813024b7e19b09e94255a4322051ed8a08489871784e2270c61fc707
7
+ data.tar.gz: c29a95e1fc562d975cf15621fe3d50a5f38626e6b780edcd3b133ce207af2df252ae7045910a4b6617433ecd41adfdc7a089ee4954673d422189c57ec8e236d9
@@ -155,16 +155,7 @@ static VALUE get_context(VALUE node_type, VALUE context) {
155
155
  }
156
156
 
157
157
  static VALUE is_renderable_q(VALUE self, VALUE block_result) {
158
- switch (TYPE(block_result)) {
159
- case T_BIGNUM:
160
- case T_FIXNUM:
161
- case T_FLOAT:
162
- case T_STRING:
163
- return Qtrue;
164
- default:
165
- return Qfalse;
166
- }
167
- return Qfalse;
158
+ return (TYPE(block_result) == T_STRING) ? Qtrue : Qfalse;
168
159
  }
169
160
 
170
161
  static VALUE render_class_component(VALUE vnode, VALUE context, VNode *v) {
@@ -214,7 +205,7 @@ static VALUE render_class_component(VALUE vnode, VALUE context, VNode *v) {
214
205
  rb_ary_push(pr, rb_ary_new());
215
206
  VALUE block_result = rb_funcall(c, id_render, 0);
216
207
  VALUE render_result = rb_ary_pop(pr);
217
- if (is_renderable_q(mPreact, block_result) == Qtrue)
208
+ if (TYPE(block_result) == T_STRING) // is_renderable_q
218
209
  rb_ary_push(render_result, block_result);
219
210
  return render_result;
220
211
  }
@@ -462,7 +453,7 @@ static VALUE create_element(int argc, VALUE *argv, VALUE self) {
462
453
  rb_ary_push(pr, rb_ary_new());
463
454
  VALUE block_result = rb_yield(Qnil);
464
455
  VALUE c = rb_ary_pop(pr);
465
- if (is_renderable_q(mPreact, block_result) == Qtrue)
456
+ if (TYPE(block_result) == T_STRING) // is_renderable_q
466
457
  rb_ary_push(c, block_result);
467
458
  if (RARRAY_LEN(c) > 0)
468
459
  children = c;
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Preact
3
- VERSION = '23.7.0.rc3'
3
+ VERSION = '23.7.0.rc5'
4
4
  end
5
5
  end
data/lib/preact.rb CHANGED
@@ -1188,7 +1188,7 @@ module Preact
1188
1188
  attr_accessor :rerender_queue
1189
1189
 
1190
1190
  def is_renderable?(res)
1191
- `(res !== null && res !== undefined && res !== nil && (res.$$is_string || res.$$is_number))`
1191
+ `(res !== null && res !== undefined && res !== nil && res.$$is_string)`
1192
1192
  end
1193
1193
 
1194
1194
  def create_element(type, props = nil, children = nil)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-preact
3
3
  version: !ruby/object:Gem::Version
4
- version: 23.7.0.rc3
4
+ version: 23.7.0.rc5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-13 00:00:00.000000000 Z
11
+ date: 2023-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -78,28 +78,28 @@ dependencies:
78
78
  requirements:
79
79
  - - '='
80
80
  - !ruby/object:Gem::Version
81
- version: 23.7.0.rc3
81
+ version: 23.7.0.rc5
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - '='
87
87
  - !ruby/object:Gem::Version
88
- version: 23.7.0.rc3
88
+ version: 23.7.0.rc5
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: isomorfeus-redux
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - '='
94
94
  - !ruby/object:Gem::Version
95
- version: 23.7.0.rc3
95
+ version: 23.7.0.rc5
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - '='
101
101
  - !ruby/object:Gem::Version
102
- version: 23.7.0.rc3
102
+ version: 23.7.0.rc5
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: benchmark-ips
105
105
  requirement: !ruby/object:Gem::Requirement