rucy 0.1.16 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/include/rucy/ruby.h +0 -1
- data/rucy.gemspec +1 -1
- data/src/value.cpp.erb +17 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 590d30c635bbc6cdf9d3f4f4c2022a0d024c62c0d2f3e08a83f075ac2ef50681
|
4
|
+
data.tar.gz: 20f747540814744c0444d7606c488167f9cc1d1ae5f751527e21cf57f7880bef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee3769c74d21c01131a036582c16ce6083c5eacc87bd528044f00c459a5480cae28dc129ec306dd171385a22588b07ffe62de6ccea946e0cb5a4f643ede20144
|
7
|
+
data.tar.gz: 9af4e962f4b62b49ed5c7d213fb28357f7ebe00279b6b7d981e2dd5991d17e289547ac28a69e247f96277973aeee13b94ab7fef462c65276ad4f59b049e3711f
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.18
|
data/include/rucy/ruby.h
CHANGED
data/rucy.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.platform = Gem::Platform::RUBY
|
29
29
|
s.required_ruby_version = '~> 2'
|
30
30
|
|
31
|
-
s.add_runtime_dependency 'xot', '~> 0.1'
|
31
|
+
s.add_runtime_dependency 'xot', '~> 0.1.16'
|
32
32
|
|
33
33
|
s.files = `git ls-files`.split $/
|
34
34
|
s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f}
|
data/src/value.cpp.erb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
#include <assert.h>
|
6
|
+
#include <ruby/encoding.h>
|
6
7
|
#include "rucy/function.h"
|
7
8
|
#include "rucy/exception.h"
|
8
9
|
#include "rucy/debug.h"
|
@@ -55,15 +56,29 @@ namespace Rucy
|
|
55
56
|
{
|
56
57
|
}
|
57
58
|
|
59
|
+
static VALUE
|
60
|
+
str_new (const char* s)
|
61
|
+
{
|
62
|
+
rb_encoding* e = rb_default_internal_encoding();
|
63
|
+
return e ? rb_enc_str_new_cstr(s, e) : rb_str_new_cstr(s);
|
64
|
+
}
|
65
|
+
|
66
|
+
static VALUE
|
67
|
+
str_new (const char* s, size_t len)
|
68
|
+
{
|
69
|
+
rb_encoding* e = rb_default_internal_encoding();
|
70
|
+
return e ? rb_enc_str_new(s, len, e) : rb_str_new(s, len);
|
71
|
+
}
|
72
|
+
|
58
73
|
Value::Value (const char* s)
|
59
|
-
: val(s ?
|
74
|
+
: val(s ? str_new(s) : Qnil)
|
60
75
|
{
|
61
76
|
if (!s)
|
62
77
|
argument_error(__FILE__, __LINE__);
|
63
78
|
}
|
64
79
|
|
65
80
|
Value::Value (const char* s, size_t len)
|
66
|
-
: val(s ?
|
81
|
+
: val(s ? str_new(s, len) : Qnil)
|
67
82
|
{
|
68
83
|
if (!s)
|
69
84
|
argument_error(__FILE__, __LINE__);
|
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.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xordog
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-29 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:
|
19
|
+
version: 0.1.16
|
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:
|
26
|
+
version: 0.1.16
|
27
27
|
description: This library helps you to develop Ruby Extension by C++.
|
28
28
|
email: xordog@gmail.com
|
29
29
|
executables:
|