edn_turbo 0.8.0 → 0.9.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1f65f5310e96d3499d0399693a666beabec89267a1d9b24208975838a798975
4
- data.tar.gz: 99f6e84ff441c7011b7d565086e94202b9d559e344b32a131c3f6c22efb8321f
3
+ metadata.gz: fecff3306497ab50ba2ff8637062d554b959b970f3f669c997479f98e4897233
4
+ data.tar.gz: d3935248c921e9bcbde72a15551c1e4e24c484676c1017c3d87cbcd2a6521c2a
5
5
  SHA512:
6
- metadata.gz: 79fb42952469ab2a60549f15237020a989e6dda70e251dee8888b14f5274788b2fc6b467a02c758bade4bbb7429983341d9eb7bce5bc2937172b80f42a8c7c34
7
- data.tar.gz: a194eb08824f20c2f42e991269afd54e159fb3038d26184e3b192e5ace56a8463af40a1c209967d938a0da8d925367ae2b7604bbdf4fbe19a58dad3e732129a4
6
+ metadata.gz: dc6e3362a6470141fcd3893aaf61a38f8c8d738e4540957f87f504d142fe71a0ef7503e327ecbab4a4cea737282b096f1f74ded1ff3ea01cc94addc6fba2d227
7
+ data.tar.gz: 29b805e543c7998c6a682f277607c1e17d8bff7668db1ad6c75861c522079a326893450fa4aa806c850d1b26de8d2c8faa386053e310e798379bfec95a34749d
data/.dir-locals.el CHANGED
@@ -1,3 +1,3 @@
1
1
  ((c++-mode
2
- (flycheck-clang-language-standard . "c++11")
3
- (flycheck-gcc-language-standard . "c++11")))
2
+ (flycheck-clang-language-standard . "c++17")
3
+ (flycheck-gcc-language-standard . "c++17")))
@@ -15,11 +15,12 @@ jobs:
15
15
  # - macos-latest
16
16
  # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
17
17
  ruby:
18
- - '2.6'
19
- - '2.7'
20
18
  - '3.0'
21
19
  - '3.1'
22
20
  - '3.2'
21
+ - '3.3'
22
+ - '3.4'
23
+ - '4.0'
23
24
  runs-on: ${{ matrix.os }}
24
25
  steps:
25
26
  - run: sudo apt-get install -y libicu-dev libreadline-dev ragel
@@ -27,7 +28,7 @@ jobs:
27
28
  with:
28
29
  ruby-version: ${{ matrix.ruby }}
29
30
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
30
- - uses: actions/checkout@v2
31
+ - uses: actions/checkout@v5
31
32
  - run: bundle install
32
33
  - run: bundle exec rake
33
34
  - run: bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -1,6 +1,24 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
3
3
 
4
+ ## [0.9.0] - 2026-04-20
5
+ ### Changed
6
+ * Bumped minimum ruby version to 3.0.
7
+
8
+ ### Fixed
9
+ * Register global VALUEs using `rb_global_variable`.
10
+
11
+ ## [0.8.1] - 2025-05-09
12
+ ### Added
13
+ * bigdecimal as explicit dependency.
14
+
15
+ ### Changed
16
+ * remove extra argument to Parser#next (caleb).
17
+ * changed compile flags to use c++17.
18
+
19
+ ### Fixed
20
+ * coerce char to fix endless loop in aarch64 linux systems (#20).
21
+
4
22
  ## [0.8.0] - 2023-03-12
5
23
  ### Changed
6
24
  * switch edn-ruby dependency to use edn2023.
@@ -60,7 +78,9 @@ All notable changes to this project will be documented in this file. This change
60
78
  ### Added
61
79
  * initial version of docker configs for testing on Ubuntu.
62
80
 
63
- [Unreleased]: https://github.com/edporras/edn_turbo/-/compare/0.8.0...main
81
+ [Unreleased]: https://github.com/edporras/edn_turbo/-/compare/0.9.0...devel
82
+ [0.9.0]: https://github.com/edporras/edn_turbo/-/compare/0.8.1...0.9.0
83
+ [0.8.1]: https://github.com/edporras/edn_turbo/-/compare/0.8.0...0.8.1
64
84
  [0.8.0]: https://github.com/edporras/edn_turbo/-/compare/0.7.4...0.8.0
65
85
  [0.7.4]: https://github.com/edporras/edn_turbo/-/compare/0.7.3...0.7.4
66
86
  [0.7.3]: https://github.com/edporras/edn_turbo/-/compare/0.7.2...0.7.3
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2023 Ed Porras
3
+ Copyright (c) 2015-2026 Ed Porras
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- edn_turbo 0.8.0
1
+ edn_turbo 0.9.0
2
2
  ===============
3
3
 
4
4
  Fast [Ragel](http://www.colm.net/open-source/ragel/)-based EDN parser for Ruby.
@@ -33,13 +33,13 @@ irb(main):008:0> Benchmark.realtime { 100000.times { EDN::read(s) } }
33
33
  Dependencies
34
34
  ============
35
35
 
36
- Ruby 2.6 or greater.
36
+ Ruby 3.0 or greater.
37
37
 
38
38
  - ruby gems:
39
39
  - [rake](http://rake.rubyforge.org)
40
40
  - [rake-compiler](http://rake-compiler.rubyforge.org)
41
41
  - [edn2023]
42
- - a C++-11 capable compiler.
42
+ - a C++-17 capable compiler.
43
43
  - [icu4c](http://icu-project.org/apiref/icu4c/)
44
44
 
45
45
  Notes:
@@ -123,5 +123,14 @@ calls into the ruby side.
123
123
 
124
124
  - As of v0.8.0, `edn_turbo` replaces its [edn-ruby] with [edn2023].
125
125
 
126
+ Building and running tests
127
+ ==========================
128
+
129
+ ```sh
130
+ bundle install
131
+ bundle exec rake
132
+ bundle exec rspec
133
+ ```
134
+
126
135
  [edn-ruby]: https://github.com/relevance/edn-ruby
127
136
  [edn2023]: https://github.com/edn2023/edn2023
data/bin/ppedn CHANGED
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
- # -*- coding: utf-8 -*-
3
2
  # frozen_string_literal: true
4
3
 
5
- $LOAD_PATH << File.expand_path(File.dirname(__FILE__) + '/../lib')
4
+ $LOAD_PATH << File.expand_path("#{File.dirname(__FILE__)}/../lib")
6
5
 
7
6
  require 'optparse'
8
7
  require 'edn'
data/bin/ppedn-ruby CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- # -*- coding: utf-8 -*-
3
2
  # frozen_string_literal: true
4
3
 
5
4
  require 'edn'
@@ -2,7 +2,7 @@
2
2
  #line 1 "edn_parser.rl"
3
3
  // The MIT License (MIT)
4
4
 
5
- // Copyright (c) 2015-2023 Ed Porras
5
+ // Copyright (c) 2015-2026 Ed Porras
6
6
 
7
7
  // Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  // of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  // The MIT License (MIT)
2
2
 
3
- // Copyright (c) 2015-2023 Ed Porras
3
+ // Copyright (c) 2015-2026 Ed Porras
4
4
 
5
5
  // Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  // of this software and associated documentation files (the "Software"), to deal
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License (MIT)
4
4
 
5
- # Copyright (c) 2015-2023 Ed Porras
5
+ # Copyright (c) 2015-2026 Ed Porras
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the "Software"), to deal
@@ -24,11 +24,11 @@
24
24
 
25
25
  require 'mkmf'
26
26
 
27
- ENV['PKG_CONFIG_PATH'] ||= ""
27
+ ENV['PKG_CONFIG_PATH'] ||= ''
28
28
  ENV['PKG_CONFIG_PATH'] += if RUBY_PLATFORM =~ /darwin/
29
- ":/usr/local/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/icu4c/lib/pkgconfig"
29
+ ':/usr/local/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/icu4c/lib/pkgconfig'
30
30
  else
31
- ":/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig"
31
+ ':/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig'
32
32
  end
33
33
 
34
34
  pkg_config('icu-uc')
@@ -40,14 +40,14 @@ else
40
40
  # remove some flags that are either clang-specific or unrecognized
41
41
  # but somehow get passed under linux (?!)
42
42
  %w[
43
- -Wno-self-assign -Wno-parentheses-equality -Wno-constant-logical-operand
44
- -Wno-cast-function-type -Wdeclaration-after-statement -Wimplicit-function-declaration
45
- -Wimplicit-int
46
- ].each do |f|
43
+ -Wno-self-assign -Wno-parentheses-equality -Wno-constant-logical-operand
44
+ -Wno-cast-function-type -Wdeclaration-after-statement -Wimplicit-function-declaration
45
+ -Wimplicit-int
46
+ ].each do |f|
47
47
  $warnflags.sub!(f, '')
48
48
  end
49
49
  end
50
- $CXXFLAGS << ' -std=c++11 -std=gnu++11'
50
+ $CXXFLAGS << ' -std=c++17 -std=gnu++17'
51
51
 
52
52
  abort "\n>> failed to find icu4c headers - is icu4c installed?\n\n" unless
53
53
  find_header('unicode/uversion.h')
@@ -1,6 +1,6 @@
1
1
  // The MIT License (MIT)
2
2
 
3
- // Copyright (c) 2015-2023 Ed Porras
3
+ // Copyright (c) 2015-2026 Ed Porras
4
4
 
5
5
  // Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  // of this software and associated documentation files (the "Software"), to deal
@@ -26,6 +26,7 @@
26
26
  #include <cstring>
27
27
 
28
28
  #include <ruby/ruby.h>
29
+ #include <ruby/internal/gc.h>
29
30
  #include <ruby/version.h>
30
31
  #include <ruby/io.h>
31
32
 
@@ -167,7 +168,7 @@ namespace edn {
167
168
 
168
169
  //
169
170
  // gets the next token in the current stream
170
- static VALUE next(VALUE self, VALUE data)
171
+ static VALUE next(VALUE self)
171
172
  {
172
173
  return get_parser(self)->next();
173
174
  }
@@ -197,6 +198,13 @@ void Init_edn_turbo(void)
197
198
  rb_raise(rb_eRuntimeError, "Extension init error calling setlocale() - It appears your system's locale is not configured correctly.\n");
198
199
  }
199
200
 
201
+ // Register global VALUE slots before assigning Ruby objects to them.
202
+ rb_global_variable(&edn::rb_mEDN);
203
+ rb_global_variable(&edn::rb_mEDNT);
204
+ rb_global_variable(&edn::RUBY_NAN_CONST);
205
+ rb_global_variable(&edn::RUBY_INF_CONST);
206
+ rb_global_variable(&edn::EDN_EOF_CONST);
207
+
200
208
  edn::rb_mEDN = rb_const_get(rb_cObject, rb_intern("EDN"));
201
209
  edn::rb_mEDNT = rb_define_module("EDNT");
202
210
 
@@ -1,6 +1,6 @@
1
1
  // The MIT License (MIT)
2
2
 
3
- // Copyright (c) 2015-2023 Ed Porras
3
+ // Copyright (c) 2015-2026 Ed Porras
4
4
 
5
5
  // Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  // of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  // The MIT License (MIT)
2
2
 
3
- // Copyright (c) 2015-2023 Ed Porras
3
+ // Copyright (c) 2015-2026 Ed Porras
4
4
 
5
5
  // Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  // of this software and associated documentation files (the "Software"), to deal
@@ -128,14 +128,14 @@ namespace edn
128
128
  // read as much data available
129
129
  if (core_io) {
130
130
  // ruby core IO types
131
- char c;
131
+ int c;
132
132
  while (1)
133
133
  {
134
134
  c = fgetc(core_io);
135
135
  if (c == EOF) {
136
136
  break;
137
137
  }
138
- str_buf += c;
138
+ str_buf += static_cast<char>(c);
139
139
  }
140
140
 
141
141
  } else if (read_io != Qnil) {
@@ -1,6 +1,6 @@
1
1
  // The MIT License (MIT)
2
2
 
3
- // Copyright (c) 2015-2023 Ed Porras
3
+ // Copyright (c) 2015-2026 Ed Porras
4
4
 
5
5
  // Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  // of this software and associated documentation files (the "Software"), to deal
data/ext/edn_turbo/util.h CHANGED
@@ -1,6 +1,6 @@
1
1
  // The MIT License (MIT)
2
2
 
3
- // Copyright (c) 2015-2023 Ed Porras
3
+ // Copyright (c) 2015-2026 Ed Porras
4
4
 
5
5
  // Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  // of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  // The MIT License (MIT)
2
2
 
3
- // Copyright (c) 2015-2023 Ed Porras
3
+ // Copyright (c) 2015-2026 Ed Porras
4
4
 
5
5
  // Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  // of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  // The MIT License (MIT)
2
2
 
3
- // Copyright (c) 2015-2023 Ed Porras
3
+ // Copyright (c) 2015-2026 Ed Porras
4
4
 
5
5
  // Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  // of this software and associated documentation files (the "Software"), to deal
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License (MIT)
4
4
  #
5
- # Copyright (c) 2015-2023 Ed Porras
5
+ # Copyright (c) 2015-2026 Ed Porras
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the "Software"), to deal
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License (MIT)
4
4
  #
5
- # Copyright (c) 2015-2023 Ed Porras
5
+ # Copyright (c) 2015-2026 Ed Porras
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the "Software"), to deal
@@ -23,6 +23,6 @@
23
23
  # THE SOFTWARE.
24
24
 
25
25
  module EDNT
26
- VERSION = '0.8.0'
27
- RELEASE_DATE = '2023-03-12'
26
+ VERSION = '0.9.0'
27
+ RELEASE_DATE = '2026-04-20'
28
28
  end
data/lib/edn_turbo.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # The MIT License (MIT)
4
4
  #
5
- # Copyright (c) 2015-2023 Ed Porras
5
+ # Copyright (c) 2015-2026 Ed Porras
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2015-2023 Ed Porras
3
+ # Copyright (c) 2015-2026 Ed Porras
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -308,6 +308,17 @@ module EDNT
308
308
  it 'uuid' do
309
309
  expect(subject.parse(' #uuid "f81d4fae-7dec-11d0-a765-00a0c91e6bf6" ')).to eq('f81d4fae-7dec-11d0-a765-00a0c91e6bf6')
310
310
  end
311
+
312
+ it 'survives GC.compact while parsing tags' do
313
+ skip 'GC.compact not supported' unless GC.respond_to?(:compact)
314
+
315
+ data = ' #uuid "f81d4fae-7dec-11d0-a765-00a0c91e6bf6" '
316
+ expect(subject.parse(data)).to eq('f81d4fae-7dec-11d0-a765-00a0c91e6bf6')
317
+
318
+ GC.compact
319
+
320
+ expect(subject.parse(data)).to eq('f81d4fae-7dec-11d0-a765-00a0c91e6bf6')
321
+ end
311
322
  end
312
323
 
313
324
  context 'collections' do
metadata CHANGED
@@ -1,15 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edn_turbo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ed Porras
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-03-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: bigdecimal
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '3.0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '3.0'
13
26
  - !ruby/object:Gem::Dependency
14
27
  name: edn2023
15
28
  requirement: !ruby/object:Gem::Requirement
@@ -139,7 +152,6 @@ homepage: http://rubygems.org/gems/edn_turbo
139
152
  licenses:
140
153
  - MIT
141
154
  metadata: {}
142
- post_install_message:
143
155
  rdoc_options: []
144
156
  require_paths:
145
157
  - lib
@@ -147,15 +159,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
159
  requirements:
148
160
  - - ">="
149
161
  - !ruby/object:Gem::Version
150
- version: 2.6.0
162
+ version: 3.0.0
151
163
  required_rubygems_version: !ruby/object:Gem::Requirement
152
164
  requirements:
153
165
  - - ">="
154
166
  - !ruby/object:Gem::Version
155
167
  version: '0'
156
168
  requirements: []
157
- rubygems_version: 3.3.7
158
- signing_key:
169
+ rubygems_version: 3.6.8
159
170
  specification_version: 4
160
171
  summary: Read EDN files
161
172
  test_files: []