rucy 0.1.42 → 0.1.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +11 -0
- data/VERSION +1 -1
- data/include/rucy/value.h.erb +21 -3
- data/rucy.gemspec +1 -1
- data/src/value.cpp.erb +23 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7410bc5ab8edd7026da4603fecbadc7e628e42f63bb3a04550ba49eb0636661
|
4
|
+
data.tar.gz: cc7d0f386395368b11c17ddc699094e5960e28426d8cf43f8141dd565e8e05b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c79e0c29c9990821ed62e0093a43080addc6e4530a8b7066c73c4ee638d3632edd6b5f41578608b845613832cb5c3cef2ddf2b0fea766ed80fd30f4615c2c7
|
7
|
+
data.tar.gz: a9040e5e82e59ef7b0b5b708bf4888dc1b6142f9c6e26f30da629a379345e13f9b09298804d29ea136f88353fb34fcd23e39c209eecf256225c237b020e34276
|
data/ChangeLog.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
# rucy ChangeLog
|
2
2
|
|
3
3
|
|
4
|
+
## [v0.1.44] - 2024-02-07
|
5
|
+
|
6
|
+
- Update dependencies
|
7
|
+
|
8
|
+
|
9
|
+
## [v0.1.43] - 2024-01-08
|
10
|
+
|
11
|
+
- Add Hash class
|
12
|
+
- Add set() and get() to Value class
|
13
|
+
|
14
|
+
|
4
15
|
## [v0.1.42] - 2023-12-09
|
5
16
|
|
6
17
|
- Trigger github actions on all pull_request
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.44
|
data/include/rucy/value.h.erb
CHANGED
@@ -112,6 +112,10 @@ namespace Rucy
|
|
112
112
|
|
113
113
|
Value inspect () const;
|
114
114
|
|
115
|
+
// String
|
116
|
+
|
117
|
+
const char* c_str () const;
|
118
|
+
|
115
119
|
// Array
|
116
120
|
|
117
121
|
Value push (Value obj);
|
@@ -126,16 +130,20 @@ namespace Rucy
|
|
126
130
|
|
127
131
|
const Value& operator [] (size_t i) const;
|
128
132
|
|
129
|
-
//
|
133
|
+
// Hash
|
130
134
|
|
131
|
-
|
135
|
+
void set (Value key, Value value);
|
132
136
|
|
133
|
-
|
137
|
+
Value get (Value key) const;
|
138
|
+
|
139
|
+
// String / Array
|
134
140
|
|
135
141
|
int length () const;
|
136
142
|
|
137
143
|
int size () const;
|
138
144
|
|
145
|
+
// String / Array / Hash
|
146
|
+
|
139
147
|
bool empty () const;
|
140
148
|
|
141
149
|
protected:
|
@@ -145,6 +153,16 @@ namespace Rucy
|
|
145
153
|
};// Value
|
146
154
|
|
147
155
|
|
156
|
+
class Hash : public Value
|
157
|
+
{
|
158
|
+
|
159
|
+
public:
|
160
|
+
|
161
|
+
Hash ();
|
162
|
+
|
163
|
+
};// Hash
|
164
|
+
|
165
|
+
|
148
166
|
class GlobalValue : public Value
|
149
167
|
{
|
150
168
|
|
data/rucy.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.platform = Gem::Platform::RUBY
|
26
26
|
s.required_ruby_version = '>= 3.0.0'
|
27
27
|
|
28
|
-
s.add_runtime_dependency 'xot', '~> 0.1.
|
28
|
+
s.add_runtime_dependency 'xot', '~> 0.1.42'
|
29
29
|
|
30
30
|
s.files = `git ls-files`.split $/
|
31
31
|
s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f}
|
data/src/value.cpp.erb
CHANGED
@@ -321,6 +321,12 @@ namespace Rucy
|
|
321
321
|
return call(inspect);
|
322
322
|
}
|
323
323
|
|
324
|
+
const char*
|
325
|
+
Value::c_str () const
|
326
|
+
{
|
327
|
+
return as_s(true);
|
328
|
+
}
|
329
|
+
|
324
330
|
Value
|
325
331
|
Value::push (Value obj)
|
326
332
|
{
|
@@ -357,10 +363,18 @@ namespace Rucy
|
|
357
363
|
return const_cast<Value*>(this)->operator[](i);
|
358
364
|
}
|
359
365
|
|
360
|
-
|
361
|
-
Value::
|
366
|
+
void
|
367
|
+
Value::set (Value key, Value value)
|
362
368
|
{
|
363
|
-
|
369
|
+
RUCY_SYMBOL(array_set, "[]=");
|
370
|
+
call(array_set, key, value);
|
371
|
+
}
|
372
|
+
|
373
|
+
Value
|
374
|
+
Value::get (Value key) const
|
375
|
+
{
|
376
|
+
RUCY_SYMBOL(array_get, "[]");
|
377
|
+
return call(array_get, key);
|
364
378
|
}
|
365
379
|
|
366
380
|
static int
|
@@ -395,6 +409,12 @@ namespace Rucy
|
|
395
409
|
}
|
396
410
|
|
397
411
|
|
412
|
+
Hash::Hash ()
|
413
|
+
: Value(rb_hash_new())
|
414
|
+
{
|
415
|
+
}
|
416
|
+
|
417
|
+
|
398
418
|
GlobalValue::GlobalValue ()
|
399
419
|
{
|
400
420
|
init(false);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rucy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.44
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xordog
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xot
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.
|
19
|
+
version: 0.1.42
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1.
|
26
|
+
version: 0.1.42
|
27
27
|
description: This library helps you to develop Ruby Extension by C++.
|
28
28
|
email: xordog@gmail.com
|
29
29
|
executables:
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
|
-
rubygems_version: 3.4.
|
118
|
+
rubygems_version: 3.4.19
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: A Ruby C++ Extension Helper Library.
|