isomorfeus-preact 23.7.0.rc3 → 23.7.0.rc4

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: 2a716fa5db31975a9ad530fd668fa4f44e429411b2cdf64ff38a3ba087004a2d
4
+ data.tar.gz: 531dd5efc835cd3945c585cfce5c06ed1763344d36c4de489befc23e69af95b5
5
5
  SHA512:
6
- metadata.gz: a82cf0365de27cccd74c76d402d826b8b083b5cbd7243bcd11b2fd53ea62105214f1cd6cc1d1987f6305da4f1ae7d5f116199daee339ea48a43cab1e719c7be9
7
- data.tar.gz: 286228aec98baed80ae89be0c093b12937869027cc2aa1a0cedd94d6eb7c728303df5df3a5197dc52f4eb85b139741a77e9e7576301ad22c9936c49a35ac3dbb
6
+ metadata.gz: b45462a5083ae7d2f7ee7ec853b48e921bd97d6cc6a436d03ab383c291790054e80dcfddbe2a6f37d2923f7ed6d4ae8d560ca8f94b5b3f41c26799505cba5862
7
+ data.tar.gz: f74e88b8369067509ac1b0588251e0575563f7079c244ff84d47f6df6d79d0499a159cbac5ac5c28356e3cb6cce78cd4852bd176d7440b5ec2f4fe1bfcc15c1d
@@ -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.rc4'
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.rc4
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-07-21 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.rc4
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.rc4
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.rc4
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.rc4
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: benchmark-ips
105
105
  requirement: !ruby/object:Gem::Requirement