ryo.rb 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -170,6 +170,14 @@ RSpec.describe Ryo::Reflect do
170
170
  it { expect(table["point"]["point"]).to be_instance_of(Hash) }
171
171
  it { is_expected.to eq("point" => {"point" => {"x" => 1, "y" => 1}}) }
172
172
  end
173
+
174
+ context "when a Ryo object references an Array" do
175
+ let(:ryo) { Ryo(points: [Ryo(x: 1, y: 1)]) }
176
+ it { expect(table).to be_instance_of(Hash) }
177
+ it { expect(table["points"]).to be_instance_of(Array) }
178
+ it { expect(table["points"][0]).to be_instance_of(Hash) }
179
+ it { is_expected.to eq("points" => [{"x" => 1, "y" => 1}]) }
180
+ end
173
181
  end
174
182
  end
175
183
  end
data/spec/ryo_spec.rb CHANGED
@@ -113,7 +113,7 @@ RSpec.describe Ryo do
113
113
  end
114
114
 
115
115
  context "when verifying the source and duplicate are distinct objects" do
116
- subject { Ryo.kernel(:equal?).bind_call(point_c, dup) }
116
+ subject { Module.instance_method(:equal?).bind_call(point_c, dup) }
117
117
  it { is_expected.to eq(false) }
118
118
  end
119
119
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ryo.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - '0x1eef'
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-20 00:00:00.000000000 Z
11
+ date: 2024-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yard
@@ -121,6 +121,7 @@ files:
121
121
  - lib/ryo/memo.rb
122
122
  - lib/ryo/object.rb
123
123
  - lib/ryo/reflect.rb
124
+ - lib/ryo/utils.rb
124
125
  - lib/ryo/version.rb
125
126
  - lib/ryo/yaml.rb
126
127
  - ryo.rb.gemspec
@@ -168,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
169
  - !ruby/object:Gem::Version
169
170
  version: '0'
170
171
  requirements: []
171
- rubygems_version: 3.5.9
172
+ rubygems_version: 3.5.13
172
173
  signing_key:
173
174
  specification_version: 4
174
175
  summary: Ryo implements prototype-based inheritance, in Ruby