ruby_tree_sitter 0.20.6.4-x86_64-linux → 0.20.8.1-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/ext/tree_sitter/tree.c +8 -2
- data/lib/tree_sitter/tree_sitter.so +0 -0
- data/lib/tree_sitter/version.rb +1 -1
- data/test/tree_sitter/tree_test.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a6f2bbfd48e8ad005f6a1492fe5a77744d96ebbdefcfbb4444b4feb585793fa
|
4
|
+
data.tar.gz: 27a035bbd5cc1ed84dd0ff0677022841f9f7a404d0bb28513fbb5ea8b1fc9626
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27e3aed67258cfbc6684101d0e1c44ea2fdc852627001feb5c921353bc562a542f0c1c160d6e7f83fc7484842e69a3e1848fa55e58993b3a416832d8bfeca6aa
|
7
|
+
data.tar.gz: 3ec4660b0996197367f76821fa1fc5bd4522658871eda1326a9470241fa144da3a5a4b976245147ee50bb9576dac385d043cd869e3e8cf47fd05cba584675083
|
data/README.md
CHANGED
@@ -41,8 +41,8 @@ allows us to better experiment, and easily port ideas from other projects.
|
|
41
41
|
This gem follows the `tree-sitter` versioning scheme, and appends its own
|
42
42
|
version at the end.
|
43
43
|
|
44
|
-
For instance, `tree-sitter` is now at version `0.20.
|
45
|
-
will be `0.20.
|
44
|
+
For instance, `tree-sitter` is now at version `0.20.8`, so this gem's version
|
45
|
+
will be `0.20.8.x` where x is incremented with every notable batch of
|
46
46
|
bugfixes or some ruby-only additions.
|
47
47
|
|
48
48
|
## Dependencies
|
data/ext/tree_sitter/tree.c
CHANGED
@@ -100,9 +100,15 @@ static VALUE tree_changed_ranges(VALUE _self, VALUE old_tree, VALUE new_tree) {
|
|
100
100
|
static VALUE tree_print_dot_graph(VALUE self, VALUE file) {
|
101
101
|
Check_Type(file, T_STRING);
|
102
102
|
char *path = StringValueCStr(file);
|
103
|
-
|
103
|
+
int fd = open(path, O_CREAT | O_WRONLY | O_TRUNC,
|
104
|
+
S_IWUSR | S_IRUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
105
|
+
if (fd < 0) {
|
106
|
+
rb_raise(rb_eRuntimeError, "Could not open file `%s'.\nReason:\n%s", path,
|
107
|
+
strerror(fd));
|
108
|
+
return Qnil;
|
109
|
+
}
|
104
110
|
ts_tree_print_dot_graph(SELF, fd);
|
105
|
-
|
111
|
+
close(fd);
|
106
112
|
return Qnil;
|
107
113
|
}
|
108
114
|
|
Binary file
|
data/lib/tree_sitter/version.rb
CHANGED
@@ -38,7 +38,7 @@ end
|
|
38
38
|
|
39
39
|
describe 'print_dot_graph' do
|
40
40
|
it 'must save to disk' do
|
41
|
-
dot = File.expand_path('tmp/tree-dot.gv', FileUtils.getwd)
|
41
|
+
dot = File.expand_path('/tmp/tree-dot.gv', FileUtils.getwd)
|
42
42
|
tree.print_dot_graph(dot)
|
43
43
|
|
44
44
|
assert File.exist?(dot), 'dot file must be exist'
|