Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-yajl-ruby for
openSUSE:Factory checked in at 2022-09-03 23:18:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-yajl-ruby (Old)
and /work/SRC/openSUSE:Factory/.rubygem-yajl-ruby.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-yajl-ruby"
Sat Sep 3 23:18:52 2022 rev:17 rq:1000917 version:1.4.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-yajl-ruby/rubygem-yajl-ruby.changes
2021-01-01 21:13:40.187383870 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-yajl-ruby.new.2083/rubygem-yajl-ruby.changes
2022-09-03 23:19:04.123814033 +0200
@@ -1,0 +2,11 @@
+Mon Aug 29 07:54:29 UTC 2022 - Stephan Kulow <[email protected]>
+
+- Remove upstreamed silence-gcc-warnings.patch
+
+-------------------------------------------------------------------
+Mon Aug 29 06:57:12 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 1.4.3
+ see installed CHANGELOG.md
+
+-------------------------------------------------------------------
Old:
----
silence-gcc-warnings.patch
yajl-ruby-1.4.1.gem
New:
----
yajl-ruby-1.4.3.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-yajl-ruby.spec ++++++
--- /var/tmp/diff_new_pack.c5jY9Y/_old 2022-09-03 23:19:04.971816262 +0200
+++ /var/tmp/diff_new_pack.c5jY9Y/_new 2022-09-03 23:19:04.975816272 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-yajl-ruby
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,33 +24,26 @@
#
Name: rubygem-yajl-ruby
-Version: 1.4.1
+Version: 1.4.3
Release: 0
%define mod_name yajl-ruby
%define mod_full_name %{mod_name}-%{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: %{rubydevel >= 1.8.6}
+BuildRequires: %{rubydevel >= 2.6.0}
BuildRequires: %{rubygem gem2rpm}
BuildRequires: ruby-macros >= 5
-URL: http://github.com/brianmario/yajl-ruby
+URL: https://github.com/brianmario/yajl-ruby
Source: https://rubygems.org/gems/%{mod_full_name}.gem
Source1: rubygem-yajl-ruby-rpmlintrc
Source2: gem2rpm.yml
-# MANUAL
-Patch0: silence-gcc-warnings.patch
-# /MANUAL
Summary: Ruby C bindings to the excellent Yajl JSON stream-based parser
-License: MIT AND BSD-3-Clause
+License: BSD-3-Clause AND MIT
Group: Development/Languages/Ruby
%description
Ruby C bindings to the excellent Yajl JSON stream-based parser library.
%prep
-%gem_unpack
-%patch0 -p1
-find -type f -print0 | xargs -0 touch -r %{S:0}
-%gem_build
%build
++++++ gem2rpm.yml ++++++
--- /var/tmp/diff_new_pack.c5jY9Y/_old 2022-09-03 23:19:05.011816367 +0200
+++ /var/tmp/diff_new_pack.c5jY9Y/_new 2022-09-03 23:19:05.015816378 +0200
@@ -1,6 +1,4 @@
:license: MIT AND BSD-3-Clause
-:patches:
- silence-gcc-warnings.patch: -p1
:sources:
- rubygem-yajl-ruby-rpmlintrc
++++++ yajl-ruby-1.4.1.gem -> yajl-ruby-1.4.3.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.github/workflows/ci.yml new/.github/workflows/ci.yml
--- old/.github/workflows/ci.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/.github/workflows/ci.yml 2022-05-26 20:26:33.000000000 +0200
@@ -0,0 +1,26 @@
+name: CI
+
+on: [push, pull_request]
+
+jobs:
+ test:
+ strategy:
+ matrix:
+ ruby_version: [2.6.x, 2.7.x, 3.0.x]
+ fail-fast: false
+ runs-on: ubuntu-latest
+ name: Test on Ruby ${{ matrix.ruby_version }}
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup Ruby ${{ matrix.ruby_version }}
+ uses: actions/setup-ruby@v1
+ with:
+ ruby-version: ${{ matrix.ruby_version }}
+ - name: Install dependencies
+ run: bundle install
+ - name: Build gem
+ run: gem build yajl-ruby.gemspec
+ - name: Install gem
+ run: gem install yajl-ruby
+ - name: Run tests
+ run: bundle exec rake spec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml 2018-07-27 18:41:51.000000000 +0200
+++ new/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-language: ruby
-rvm:
- - 2.0.0
- - 2.1
- - 2.2
- - 2.3
- - 2.4.1
- - ruby-head
-before_install: gem install bundler --no-document
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2018-07-27 18:41:51.000000000 +0200
+++ new/README.md 2022-05-26 20:26:33.000000000 +0200
@@ -126,7 +126,7 @@
results = Yajl::HttpStream.get(url)
```
-Since yajl-ruby parses JSON as a stream, supporting API's like Twitter's
Streaming API are a piece-of-cake.
+Since yajl-ruby parses JSON as a stream, supporting APIs like Twitter's
Streaming API are a piece-of-cake.
You can simply supply a block to `Yajl::HttpStream.get`, which is used as the
callback for when a JSON object has been
unserialized off the stream. For the case of this Twitter Streaming API call,
the callback gets fired a few times a second (depending on your connection
speed).
The code below is all that's needed to make the request and stream
unserialized Ruby hashes off the response, continuously.
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/api/yajl_common.h
new/ext/yajl/api/yajl_common.h
--- old/ext/yajl/api/yajl_common.h 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/api/yajl_common.h 2022-05-26 20:26:33.000000000 +0200
@@ -56,6 +56,12 @@
# endif
#endif
+#if defined(__GNUC__)
+#define YAJL_WARN_UNUSED __attribute__ ((warn_unused_result))
+#else
+#define YAJL_WARN_UNUSED
+#endif
+
/** pointer to a malloc function, supporting client overriding memory
* allocation routines */
typedef void * (*yajl_malloc_func)(void *ctx, unsigned int sz);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/api/yajl_gen.h new/ext/yajl/api/yajl_gen.h
--- old/ext/yajl/api/yajl_gen.h 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/api/yajl_gen.h 2022-05-26 20:26:33.000000000 +0200
@@ -63,7 +63,11 @@
yajl_gen_invalid_number,
/** A print callback was passed in, so there is no internal
* buffer to get from */
- yajl_gen_no_buf
+ yajl_gen_no_buf,
+ /** Tried to decrement at depth 0 */
+ yajl_depth_underflow,
+ /** Allocation error */
+ yajl_gen_alloc_error
} yajl_gen_status;
/** an opaque handle to a generator */
@@ -129,6 +133,7 @@
* NaN, as these have no representation in JSON. In these cases the
* generator will return 'yajl_gen_invalid_number' */
YAJL_API yajl_gen_status yajl_gen_double(yajl_gen hand, double number);
+ YAJL_API yajl_gen_status yajl_gen_long(yajl_gen hand, long value);
YAJL_API yajl_gen_status yajl_gen_number(yajl_gen hand,
const char * num,
unsigned int len);
@@ -145,7 +150,7 @@
/** access the null terminated generator buffer. If incrementally
* outputing JSON, one should call yajl_gen_clear to clear the
* buffer. This allows stream generation. */
- YAJL_API yajl_gen_status yajl_gen_get_buf(yajl_gen hand,
+ YAJL_API YAJL_WARN_UNUSED yajl_gen_status yajl_gen_get_buf(yajl_gen hand,
const unsigned char ** buf,
unsigned int * len);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/api/yajl_parse.h
new/ext/yajl/api/yajl_parse.h
--- old/ext/yajl/api/yajl_parse.h 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/api/yajl_parse.h 2022-05-26 20:26:33.000000000 +0200
@@ -55,7 +55,9 @@
yajl_status_insufficient_data,
/** An error occured during the parse. Call yajl_get_error for
* more information about the encountered error */
- yajl_status_error
+ yajl_status_error,
+ /** an allocation failed */
+ yajl_status_alloc_failed,
} yajl_status;
/** attain a human readable, english, string for an error */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/extconf.rb new/ext/yajl/extconf.rb
--- old/ext/yajl/extconf.rb 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/extconf.rb 2022-05-26 20:26:33.000000000 +0200
@@ -4,4 +4,9 @@
$CFLAGS << ' -Wall -funroll-loops -Wno-declaration-after-statement'
$CFLAGS << ' -Werror-implicit-function-declaration -Wextra -O0 -ggdb3' if
ENV['DEBUG']
+if ENV['SANITIZE']
+ $CFLAGS << ' -fsanitize=address'
+ $LDFLAGS << ' -fsanitize=address'
+end
+
create_makefile('yajl/yajl')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/yajl.c new/ext/yajl/yajl.c
--- old/ext/yajl/yajl.c 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/yajl.c 2022-05-26 20:26:33.000000000 +0200
@@ -56,6 +56,9 @@
case yajl_status_error:
statStr = "parse error";
break;
+ case yajl_status_alloc_failed:
+ statStr = "allocation failed";
+ break;
}
return statStr;
}
@@ -83,6 +86,8 @@
}
hand = (yajl_handle) YA_MALLOC(afs, sizeof(struct yajl_handle_t));
+ if (hand == NULL)
+ return NULL;
/* copy in pointers to allocation routines */
memcpy((void *) &(hand->alloc), (void *) afs, sizeof(yajl_alloc_funcs));
@@ -95,23 +100,31 @@
hand->callbacks = callbacks;
hand->ctx = ctx;
hand->lexer = yajl_lex_alloc(&(hand->alloc), allowComments, validateUTF8);
+ if (!hand->lexer) {
+ YA_FREE(afs, hand);
+ return NULL;
+ }
hand->bytesConsumed = 0;
hand->decodeBuf = yajl_buf_alloc(&(hand->alloc));
yajl_bs_init(hand->stateStack, &(hand->alloc));
- yajl_bs_push(hand->stateStack, yajl_state_start);
+ if (yajl_bs_push(hand->stateStack, yajl_state_start)) {
+ return NULL;
+ }
return hand;
}
void
yajl_reset_parser(yajl_handle hand) {
+ assert(hand);
hand->lexer = yajl_lex_realloc(hand->lexer);
}
void
yajl_free(yajl_handle handle)
{
+ assert(handle);
yajl_bs_free(handle->stateStack);
yajl_buf_free(handle->decodeBuf);
yajl_lex_free(handle->lexer);
@@ -122,6 +135,7 @@
yajl_parse(yajl_handle hand, const unsigned char * jsonText,
unsigned int jsonTextLen)
{
+ assert(hand);
yajl_status status;
status = yajl_do_parse(hand, jsonText, jsonTextLen);
return status;
@@ -130,6 +144,7 @@
yajl_status
yajl_parse_complete(yajl_handle hand)
{
+ assert(hand);
/* The particular case we want to handle is a trailing number.
* Further input consisting of digits could cause our interpretation
* of the number to change (buffered "1" but "2" comes in).
@@ -143,6 +158,7 @@
yajl_get_error(yajl_handle hand, int verbose,
const unsigned char * jsonText, unsigned int jsonTextLen)
{
+ assert(hand);
return yajl_render_error_string(hand, jsonText, jsonTextLen, verbose);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/yajl_buf.c new/ext/yajl/yajl_buf.c
--- old/ext/yajl/yajl_buf.c 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/yajl_buf.c 2022-05-26 20:26:33.000000000 +0200
@@ -35,43 +35,114 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+#include <stdio.h>
#define YAJL_BUF_INIT_SIZE 2048
struct yajl_buf_t {
+ yajl_buf_state state;
unsigned int len;
unsigned int used;
unsigned char * data;
yajl_alloc_funcs * alloc;
};
+static void *noop_realloc(void *ctx, void *ptr, unsigned int sz) {
+ fprintf(stderr, "Attempt to allocate on invalid yajl_buf_t\n");
+ abort();
+}
+static void *noop_malloc(void *ctx, unsigned int sz) { return
noop_realloc(ctx, NULL, sz); }
+static void noop_free(void *ctx, void *ptr) { }
+
+static yajl_alloc_funcs noop_allocs = {
+ .malloc = &noop_malloc,
+ .realloc = &noop_realloc,
+ .free = &noop_free,
+};
+
+// A buffer to be returned if the initial allocation fails
+static struct yajl_buf_t buf_alloc_error = {
+ .state = yajl_buf_alloc_failed,
+ .alloc = &noop_allocs
+};
+
+#include <stdio.h>
+
+yajl_buf_state yajl_buf_err(yajl_buf buf)
+{
+ assert(buf);
+ return buf->state;
+}
+
+static
+yajl_buf_state yajl_buf_set_error(yajl_buf buf, yajl_buf_state err)
+{
+ buf->state = err;
+
+ // free and clear all data from the buffer
+ YA_FREE(buf->alloc, buf->data);
+ buf->len = 0;
+ buf->data = 0;
+ buf->used = 0;
+
+ return err;
+}
+
static
-void yajl_buf_ensure_available(yajl_buf buf, unsigned int want)
+yajl_buf_state yajl_buf_ensure_available(yajl_buf buf, unsigned int want)
{
unsigned int need;
assert(buf != NULL);
+ if (buf->state != yajl_buf_ok) {
+ return buf->state;
+ }
+
/* first call */
if (buf->data == NULL) {
buf->len = YAJL_BUF_INIT_SIZE;
buf->data = (unsigned char *) YA_MALLOC(buf->alloc, buf->len);
+ if (buf->data == NULL) {
+ return yajl_buf_set_error(buf, yajl_buf_overflow);
+ }
+
buf->data[0] = 0;
}
+ if (want == 0) {
+ return yajl_buf_ok;
+ }
+
need = buf->len;
- while (want >= (need - buf->used)) need <<= 1;
+ while (want >= (need - buf->used) && need > 0) need <<= 1;
+
+ // Check for overflow
+ if (need < buf->used || need == 0) {
+ return yajl_buf_set_error(buf, yajl_buf_overflow);
+ }
if (need != buf->len) {
buf->data = (unsigned char *) YA_REALLOC(buf->alloc, buf->data, need);
+
+ if (buf->data == NULL) {
+ return yajl_buf_set_error(buf, yajl_buf_overflow);
+ }
+
buf->len = need;
}
+
+ return yajl_buf_ok;
}
yajl_buf yajl_buf_alloc(yajl_alloc_funcs * alloc)
{
yajl_buf b = YA_MALLOC(alloc, sizeof(struct yajl_buf_t));
+ if (b == NULL) {
+ return &buf_alloc_error;
+ }
+
memset((void *) b, 0, sizeof(struct yajl_buf_t));
b->alloc = alloc;
return b;
@@ -86,7 +157,9 @@
void yajl_buf_append(yajl_buf buf, const void * data, unsigned int len)
{
- yajl_buf_ensure_available(buf, len);
+ if (yajl_buf_ensure_available(buf, len)) {
+ return;
+ }
if (len > 0) {
assert(data != NULL);
memcpy(buf->data + buf->used, data, len);
@@ -97,23 +170,31 @@
void yajl_buf_clear(yajl_buf buf)
{
+ assert(buf);
+ assert(!yajl_buf_err(buf));
buf->used = 0;
if (buf->data) buf->data[buf->used] = 0;
}
const unsigned char * yajl_buf_data(yajl_buf buf)
{
+ assert(buf);
+ assert(!yajl_buf_err(buf));
return buf->data;
}
unsigned int yajl_buf_len(yajl_buf buf)
{
+ assert(buf);
+ assert(!yajl_buf_err(buf));
return buf->used;
}
void
yajl_buf_truncate(yajl_buf buf, unsigned int len)
{
+ assert(buf);
+ assert(!yajl_buf_err(buf));
assert(len <= buf->used);
buf->used = len;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/yajl_buf.h new/ext/yajl/yajl_buf.h
--- old/ext/yajl/yajl_buf.h 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/yajl_buf.h 2022-05-26 20:26:33.000000000 +0200
@@ -43,6 +43,12 @@
* call overhead. YMMV.
*/
+typedef enum {
+ yajl_buf_ok = 0,
+ yajl_buf_alloc_failed,
+ yajl_buf_overflow
+} yajl_buf_state;
+
/**
* yajl_buf is a buffer with exponential growth. the buffer ensures that
* you are always null padded.
@@ -77,4 +83,7 @@
YAJL_API
void yajl_buf_truncate(yajl_buf buf, unsigned int len);
+/* get the state of buffer */
+yajl_buf_state yajl_buf_err(yajl_buf buf);
+
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/yajl_bytestack.h
new/ext/yajl/yajl_bytestack.h
--- old/ext/yajl/yajl_bytestack.h 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/yajl_bytestack.h 2022-05-26 20:26:33.000000000 +0200
@@ -38,9 +38,12 @@
#ifndef __YAJL_BYTESTACK_H__
#define __YAJL_BYTESTACK_H__
+#include <limits.h>
+#include <assert.h>
#include "api/yajl_common.h"
#define YAJL_BS_INC 128
+#define YAJL_BS_MAX_SIZE UINT_MAX
typedef struct yajl_bytestack_t
{
@@ -66,20 +69,34 @@
#define yajl_bs_current(obs) \
(assert((obs).used > 0), (obs).stack[(obs).used - 1])
-#define yajl_bs_push(obs, byte) { \
- if (((obs).size - (obs).used) == 0) { \
- (obs).size += YAJL_BS_INC; \
- (obs).stack = (obs).yaf->realloc((obs).yaf->ctx,\
- (void *) (obs).stack, (obs).size);\
- } \
- (obs).stack[((obs).used)++] = (byte); \
+/* 0: success, 1: error */
+static inline YAJL_WARN_UNUSED
+int yajl_bs_push_inline(yajl_bytestack *obs, unsigned char byte) {
+ if ((obs->size - obs->used) == 0) {
+ if (obs->size > YAJL_BS_MAX_SIZE - YAJL_BS_INC)
+ return 1;
+ obs->size += YAJL_BS_INC;
+ obs->stack = obs->yaf->realloc(obs->yaf->ctx, (void *)obs->stack,
obs->size);
+ if (!obs->stack)
+ return 1;
+ }
+ obs->stack[obs->used++] = byte;
+ return 0;
}
-
+
+#define yajl_bs_push(obs, byte) yajl_bs_push_inline(&(obs), (byte))
+
/* removes the top item of the stack, returns nothing */
#define yajl_bs_pop(obs) { ((obs).used)--; }
-#define yajl_bs_set(obs, byte) \
- (obs).stack[((obs).used) - 1] = (byte);
-
+static inline
+void
+yajl_bs_set_inline(yajl_bytestack *obs, unsigned char byte) {
+ assert(obs->used > 0);
+ assert(obs->size >= obs->used);
+ obs->stack[obs->used - 1] = byte;
+}
+
+#define yajl_bs_set(obs, byte) yajl_bs_set_inline(&obs, byte)
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/yajl_ext.c new/ext/yajl/yajl_ext.c
--- old/ext/yajl/yajl_ext.c 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/yajl_ext.c 2022-05-26 20:26:33.000000000 +0200
@@ -93,7 +93,11 @@
rb_raise(cEncodeError, "Invalid number: cannot encode Infinity,
-Infinity, or NaN");
case yajl_gen_no_buf:
rb_raise(cEncodeError, "YAJL internal error: yajl_gen_get_buf was
called, but a print callback was specified, so no internal buffer is
available");
+ case yajl_gen_alloc_error:
+ rb_raise(cEncodeError, "YAJL internal error: failed to allocate
memory");
default:
+ // fixme: why wasn't this already here??
+ rb_raise(cEncodeError, "Encountered unknown YAJL status %d during
JSON generation", status);
return NULL;
}
}
@@ -155,18 +159,47 @@
}
}
+static VALUE yajl_key_to_string(VALUE obj) {
+ switch (TYPE(obj)) {
+ case T_STRING:
+ return obj;
+ case T_SYMBOL:
+ return rb_sym2str(obj);
+ default:
+ return rb_funcall(obj, intern_to_s, 0);
+ }
+}
+
+void yajl_encode_part(void * wrapper, VALUE obj, VALUE io);
+struct yajl_encode_hash_iter {
+ void *w;
+ VALUE io;
+};
+
+static int yajl_encode_part_hash_i(VALUE key, VALUE val, VALUE iter_v) {
+ struct yajl_encode_hash_iter *iter = (struct yajl_encode_hash_iter
*)iter_v;
+ /* key must be a string */
+ VALUE keyStr = yajl_key_to_string(key);
+
+ /* the key */
+ yajl_encode_part(iter->w, keyStr, iter->io);
+ /* the value */
+ yajl_encode_part(iter->w, val, iter->io);
+
+ return ST_CONTINUE;
+}
+
#define CHECK_STATUS(call) \
if ((status = (call)) != yajl_gen_status_ok) { break; }
void yajl_encode_part(void * wrapper, VALUE obj, VALUE io) {
- VALUE str, outBuff, otherObj;
+ VALUE str, outBuff;
yajl_encoder_wrapper * w = wrapper;
yajl_gen_status status;
int idx = 0;
const unsigned char * buffer;
const char * cptr;
unsigned int len;
- VALUE keys, entry, keyStr;
if (io != Qnil || w->on_progress_callback != Qnil) {
status = yajl_gen_get_buf(w->encoder, &buffer, &len);
@@ -188,24 +221,19 @@
case T_HASH:
CHECK_STATUS(yajl_gen_map_open(w->encoder));
- /* TODO: itterate through keys in the hash */
- keys = rb_funcall(obj, intern_keys, 0);
- for(idx=0; idx<RARRAY_LEN(keys); idx++) {
- entry = rb_ary_entry(keys, idx);
- keyStr = rb_funcall(entry, intern_to_s, 0); /* key must be a
string */
- /* the key */
- yajl_encode_part(w, keyStr, io);
- /* the value */
- yajl_encode_part(w, rb_hash_aref(obj, entry), io);
- }
+ struct yajl_encode_hash_iter iter;
+ iter.w = w;
+ iter.io = io;
+ rb_hash_foreach(obj, yajl_encode_part_hash_i, (VALUE)&iter);
CHECK_STATUS(yajl_gen_map_close(w->encoder));
break;
case T_ARRAY:
CHECK_STATUS(yajl_gen_array_open(w->encoder));
+
+ VALUE *ptr = RARRAY_PTR(obj);
for(idx=0; idx<RARRAY_LEN(obj); idx++) {
- otherObj = rb_ary_entry(obj, idx);
- yajl_encode_part(w, otherObj, io);
+ yajl_encode_part(w, ptr[idx], io);
}
CHECK_STATUS(yajl_gen_array_close(w->encoder));
break;
@@ -219,6 +247,8 @@
CHECK_STATUS(yajl_gen_bool(w->encoder, 0));
break;
case T_FIXNUM:
+ CHECK_STATUS(yajl_gen_long(w->encoder, FIX2LONG(obj)));
+ break;
case T_FLOAT:
case T_BIGNUM:
str = rb_funcall(obj, intern_to_s, 0);
@@ -234,6 +264,12 @@
len = (unsigned int)RSTRING_LEN(obj);
CHECK_STATUS(yajl_gen_string(w->encoder, (const unsigned char
*)cptr, len));
break;
+ case T_SYMBOL:
+ str = rb_sym2str(obj);
+ cptr = RSTRING_PTR(str);
+ len = (unsigned int)RSTRING_LEN(str);
+ CHECK_STATUS(yajl_gen_string(w->encoder, (const unsigned char
*)cptr, len));
+ break;
default:
if (rb_respond_to(obj, intern_to_json)) {
str = rb_funcall(obj, intern_to_json, 0);
@@ -278,11 +314,17 @@
stat = yajl_parse(parser, chunk, len);
- if (stat != yajl_status_ok && stat != yajl_status_insufficient_data) {
+ if (stat == yajl_status_ok || stat == yajl_status_insufficient_data) {
+ // success
+ } else if (stat == yajl_status_error) {
unsigned char * str = yajl_get_error(parser, 1, chunk, len);
VALUE errobj = rb_exc_new2(cParseError, (const char*) str);
yajl_free_error(parser, str);
rb_exc_raise(errobj);
+ } else {
+ const char * str = yajl_status_to_string(stat);
+ VALUE errobj = rb_exc_new2(cParseError, (const char*) str);
+ rb_exc_raise(errobj);
}
}
@@ -475,13 +517,13 @@
* Document-method: parse
*
* call-seq:
- * parse(input, buffer_size=8092)
- * parse(input, buffer_size=8092) { |obj| ... }
+ * parse(input, buffer_size=8192)
+ * parse(input, buffer_size=8192) { |obj| ... }
*
* +input+ can either be a string or an IO to parse JSON from
*
* +buffer_size+ is the size of chunk that will be parsed off the input (if
it's an IO) for each loop of the parsing process.
- * 8092 is a good balance between the different types of streams (off disk,
off a socket, etc...), but this option
+ * 8192 is a good balance between the different types of streams (off disk,
off a socket, etc...), but this option
* is here so the caller can better tune their parsing depending on the type
of stream being passed.
* A larger read buffer will perform better for files off disk, where as a
smaller size may be more efficient for
* reading off of a socket directly.
@@ -847,7 +889,7 @@
case yajl_tok_bool:;
if (memcmp(event.buf, "true", 4) == 0) {
return Qtrue;
- } else if (memcmp(event.buf, "false", 4) == 0) {
+ } else if (memcmp(event.buf, "false", 5) == 0) {
return Qfalse;
} else {
rb_raise(cStandardError, "unknown boolean token %s",
event.buf);
@@ -884,7 +926,7 @@
rb_raise(cParseError, "unexpected colon while constructing value");
default:;
- assert(0);
+ rb_bug("we should never get here");
}
}
@@ -907,6 +949,9 @@
yajl_buf strBuf = yajl_buf_alloc(parser->funcs);
yajl_string_decode(strBuf, (const unsigned char *)event.buf,
event.len);
+ if (yajl_buf_err(strBuf)) {
+ rb_raise(cParseError, "YAJL internal error: failed to allocate
memory");
+ }
VALUE str = rb_str_new((const char *)yajl_buf_data(strBuf),
yajl_buf_len(strBuf));
rb_enc_associate(str, utf8Encoding);
@@ -922,7 +967,7 @@
}
default:; {
- assert(0);
+ rb_bug("we should never get here");
}
}
}
@@ -1102,6 +1147,7 @@
const unsigned char * buffer;
unsigned int len;
VALUE obj, io, blk, outBuff;
+ yajl_gen_status status;
GetEncoder(self, wrapper);
@@ -1115,7 +1161,11 @@
yajl_encode_part(wrapper, obj, io);
/* just make sure we output the remaining buffer */
- yajl_gen_get_buf(wrapper->encoder, &buffer, &len);
+ status = yajl_gen_get_buf(wrapper->encoder, &buffer, &len);
+ if (status != yajl_gen_status_ok) {
+ yajl_raise_encode_error_for_status(status, obj);
+ }
+
outBuff = rb_str_new((const char *)buffer, len);
#ifdef HAVE_RUBY_ENCODING_H
rb_enc_associate(outBuff, utf8Encoding);
@@ -1329,6 +1379,7 @@
cStandardError = rb_const_get(rb_cObject, rb_intern("StandardError"));
cParser = rb_define_class_under(mYajl, "Parser", rb_cObject);
+ rb_undef_alloc_func(cParser);
rb_define_singleton_method(cParser, "new", rb_yajl_parser_new, -1);
rb_define_method(cParser, "initialize", rb_yajl_parser_init, -1);
rb_define_method(cParser, "parse", rb_yajl_parser_parse, -1);
@@ -1340,6 +1391,7 @@
rb_define_method(cProjector, "project", rb_yajl_projector_project, 1);
cEncoder = rb_define_class_under(mYajl, "Encoder", rb_cObject);
+ rb_undef_alloc_func(cEncoder);
rb_define_singleton_method(cEncoder, "new", rb_yajl_encoder_new, -1);
rb_define_method(cEncoder, "initialize", rb_yajl_encoder_init, -1);
rb_define_method(cEncoder, "encode", rb_yajl_encoder_encode, -1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/yajl_gen.c new/ext/yajl/yajl_gen.c
--- old/ext/yajl/yajl_gen.c 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/yajl_gen.c 2022-05-26 20:26:33.000000000 +0200
@@ -178,7 +178,7 @@
if (++(g->depth) >= YAJL_MAX_DEPTH) return yajl_max_depth_exceeded;
#define DECREMENT_DEPTH \
- if (--(g->depth) >= YAJL_MAX_DEPTH) return yajl_gen_error;
+ if (--(g->depth) >= YAJL_MAX_DEPTH) return yajl_depth_underflow;
#define APPENDED_ATOM \
switch (g->state[g->depth]) { \
@@ -231,6 +231,36 @@
}
yajl_gen_status
+yajl_gen_long(yajl_gen g, long val)
+{
+ char buf[32], *b = buf + sizeof buf;
+ unsigned int len = 0;
+ unsigned long uval;
+
+ ENSURE_VALID_STATE; ENSURE_NOT_KEY; INSERT_SEP; INSERT_WHITESPACE;
+
+ if (val < 0) {
+ g->print(g->ctx, "-", 1);
+ // Avoid overflow. This shouldn't happen because FIXNUMs are 1 bit less
+ // than LONGs, but good to be safe.
+ uval = 1 + (unsigned long)(-(val + 1));
+ } else {
+ uval = val;
+ }
+
+ do {
+ *--b = "0123456789"[uval % 10];
+ uval /= 10;
+ len++;
+ } while(uval);
+ g->print(g->ctx, b, len);
+
+ APPENDED_ATOM;
+ FINAL_NEWLINE;
+ return yajl_gen_status_ok;
+}
+
+yajl_gen_status
yajl_gen_number(yajl_gen g, const char * s, unsigned int l)
{
ENSURE_VALID_STATE; ENSURE_NOT_KEY; INSERT_SEP; INSERT_WHITESPACE;
@@ -332,6 +362,10 @@
unsigned int * len)
{
if (g->print != (yajl_print_t)&yajl_buf_append) return yajl_gen_no_buf;
+ yajl_buf_state buf_err = yajl_buf_err((yajl_buf)g->ctx);
+ if (buf_err) {
+ return yajl_gen_alloc_error;
+ }
*buf = yajl_buf_data((yajl_buf)g->ctx);
*len = yajl_buf_len((yajl_buf)g->ctx);
return yajl_gen_status_ok;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/yajl_lex.c new/ext/yajl/yajl_lex.c
--- old/ext/yajl/yajl_lex.c 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/yajl_lex.c 2022-05-26 20:26:33.000000000 +0200
@@ -43,6 +43,7 @@
case yajl_tok_bool: return "bool";
case yajl_tok_colon: return "colon";
case yajl_tok_comma: return "comma";
+ case yajl_tok_comment: return "comment";
case yajl_tok_eof: return "eof";
case yajl_tok_error: return "error";
case yajl_tok_left_brace: return "open_array";
@@ -117,6 +118,8 @@
unsigned int allowComments, unsigned int validateUTF8)
{
yajl_lexer lxr = (yajl_lexer) YA_MALLOC(alloc, sizeof(struct
yajl_lexer_t));
+ if (!lxr)
+ return NULL;
memset((void *) lxr, 0, sizeof(struct yajl_lexer_t));
lxr->buf = yajl_buf_alloc(alloc);
lxr->allowComments = allowComments;
@@ -632,7 +635,12 @@
lexer->bufInUse = 1;
yajl_buf_append(lexer->buf, jsonText + startOffset, *offset -
startOffset);
lexer->bufOff = 0;
-
+
+ if (yajl_buf_err(lexer->buf)) {
+ lexer->error = yajl_lex_alloc_failed;
+ return yajl_tok_error;
+ }
+
if (tok != yajl_tok_eof) {
*outBuf = yajl_buf_data(lexer->buf);
*outLen = yajl_buf_len(lexer->buf);
@@ -699,6 +707,8 @@
case yajl_lex_unallowed_comment:
return "probable comment found in input text, comments are "
"not enabled.";
+ case yajl_lex_alloc_failed:
+ return "allocation failed";
}
return "unknown error code";
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/yajl_lex.h new/ext/yajl/yajl_lex.h
--- old/ext/yajl/yajl_lex.h 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/yajl_lex.h 2022-05-26 20:26:33.000000000 +0200
@@ -120,7 +120,8 @@
yajl_lex_missing_integer_after_decimal,
yajl_lex_missing_integer_after_exponent,
yajl_lex_missing_integer_after_minus,
- yajl_lex_unallowed_comment
+ yajl_lex_unallowed_comment,
+ yajl_lex_alloc_failed
} yajl_lex_error;
YAJL_API
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ext/yajl/yajl_parser.c new/ext/yajl/yajl_parser.c
--- old/ext/yajl/yajl_parser.c 2018-07-27 18:41:51.000000000 +0200
+++ new/ext/yajl/yajl_parser.c 2022-05-26 20:26:33.000000000 +0200
@@ -134,6 +134,14 @@
return yajl_status_client_canceled; \
}
+/* check for buffer error */
+#define _BUF_CHK(x) \
+ if (yajl_buf_err(x)) { \
+ yajl_bs_set(hand->stateStack, yajl_state_parse_error); \
+ hand->parseError = \
+ "allocation failed"; \
+ return yajl_status_alloc_failed; \
+ }
yajl_status
yajl_do_parse(yajl_handle hand, const unsigned char * jsonText,
@@ -161,7 +169,7 @@
/* for arrays and maps, we advance the state for this
* depth, then push the state of the next depth.
* If an error occurs during the parsing of the nesting
- * enitity, the state at this level will not matter.
+ * entity, the state at this level will not matter.
* a state that needs pushing will be anything other
* than state_start */
yajl_state stateToPush = yajl_state_start;
@@ -185,6 +193,7 @@
if (hand->callbacks && hand->callbacks->yajl_string) {
yajl_buf_clear(hand->decodeBuf);
yajl_string_decode(hand->decodeBuf, buf, bufLen);
+ _BUF_CHK(hand->decodeBuf);
_CC_CHK(hand->callbacks->yajl_string(
hand->ctx, yajl_buf_data(hand->decodeBuf),
yajl_buf_len(hand->decodeBuf)));
@@ -234,6 +243,7 @@
long int i = 0;
yajl_buf_clear(hand->decodeBuf);
yajl_buf_append(hand->decodeBuf, buf, bufLen);
+ _BUF_CHK(hand->decodeBuf);
buf = yajl_buf_data(hand->decodeBuf);
i = strtol((const char *) buf, NULL, 10);
if ((i == LONG_MIN || i == LONG_MAX) &&
@@ -261,6 +271,7 @@
double d = 0.0;
yajl_buf_clear(hand->decodeBuf);
yajl_buf_append(hand->decodeBuf, buf, bufLen);
+ _BUF_CHK(hand->decodeBuf);
buf = yajl_buf_data(hand->decodeBuf);
d = strtod((char *) buf, NULL);
if ((d == HUGE_VAL || d == -HUGE_VAL) &&
@@ -320,7 +331,9 @@
}
}
if (stateToPush != yajl_state_start) {
- yajl_bs_push(hand->stateStack, stateToPush);
+ if (yajl_bs_push(hand->stateStack, stateToPush)) {
+ return yajl_status_alloc_failed;
+ }
}
goto around_again;
@@ -342,6 +355,7 @@
if (hand->callbacks && hand->callbacks->yajl_map_key) {
yajl_buf_clear(hand->decodeBuf);
yajl_string_decode(hand->decodeBuf, buf, bufLen);
+ _BUF_CHK(hand->decodeBuf);
buf = yajl_buf_data(hand->decodeBuf);
bufLen = yajl_buf_len(hand->decodeBuf);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/yajl/version.rb new/lib/yajl/version.rb
--- old/lib/yajl/version.rb 2018-07-27 18:41:51.000000000 +0200
+++ new/lib/yajl/version.rb 2022-05-26 20:26:33.000000000 +0200
@@ -1,3 +1,3 @@
module Yajl
- VERSION = '1.4.1'
+ VERSION = '1.4.3'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2018-07-27 18:41:51.000000000 +0200
+++ new/metadata 2022-05-26 20:26:33.000000000 +0200
@@ -1,15 +1,15 @@
--- !ruby/object:Gem::Specification
name: yajl-ruby
version: !ruby/object:Gem::Version
- version: 1.4.1
+ version: 1.4.3
platform: ruby
authors:
- Brian Lopez
- Lloyd Hilaiel
-autorequire:
+autorequire:
bindir: bin
cert_chain: []
-date: 2018-07-27 00:00:00.000000000 Z
+date: 2022-05-26 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rake-compiler
@@ -81,7 +81,7 @@
- - ">="
- !ruby/object:Gem::Version
version: '0'
-description:
+description:
email: [email protected]
executables: []
extensions:
@@ -89,9 +89,9 @@
extra_rdoc_files: []
files:
- ".codeclimate.yml"
+- ".github/workflows/ci.yml"
- ".gitignore"
- ".rspec"
-- ".travis.yml"
- CHANGELOG.md
- Gemfile
- LICENSE
@@ -242,11 +242,11 @@
- tasks/compile.rake
- tasks/rspec.rake
- yajl-ruby.gemspec
-homepage: http://github.com/brianmario/yajl-ruby
+homepage: https://github.com/brianmario/yajl-ruby
licenses:
- MIT
metadata: {}
-post_install_message:
+post_install_message:
rdoc_options: []
require_paths:
- lib
@@ -254,106 +254,15 @@
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: 1.8.6
+ version: 2.6.0
required_rubygems_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubyforge_project:
-rubygems_version: 2.6.11
-signing_key:
+rubygems_version: 3.3.3
+signing_key:
specification_version: 4
summary: Ruby C bindings to the excellent Yajl JSON stream-based parser
library.
-test_files:
-- examples/encoding/chunked_encoding.rb
-- examples/encoding/one_shot.rb
-- examples/encoding/to_an_io.rb
-- examples/http/twitter_search_api.rb
-- examples/http/twitter_stream_api.rb
-- examples/parsing/from_file.rb
-- examples/parsing/from_stdin.rb
-- examples/parsing/from_string.rb
-- spec/encoding/encoding_spec.rb
-- spec/global/global_spec.rb
-- spec/http/fixtures/http.bzip2.dump
-- spec/http/fixtures/http.chunked.dump
-- spec/http/fixtures/http.deflate.dump
-- spec/http/fixtures/http.error.dump
-- spec/http/fixtures/http.gzip.dump
-- spec/http/fixtures/http.html.dump
-- spec/http/fixtures/http.raw.dump
-- spec/http/http_delete_spec.rb
-- spec/http/http_error_spec.rb
-- spec/http/http_get_spec.rb
-- spec/http/http_post_spec.rb
-- spec/http/http_put_spec.rb
-- spec/http/http_stream_options_spec.rb
-- spec/json_gem_compatibility/compatibility_spec.rb
-- spec/parsing/active_support_spec.rb
-- spec/parsing/chunked_spec.rb
-- spec/parsing/fixtures/fail.15.json
-- spec/parsing/fixtures/fail.16.json
-- spec/parsing/fixtures/fail.17.json
-- spec/parsing/fixtures/fail.26.json
-- spec/parsing/fixtures/fail11.json
-- spec/parsing/fixtures/fail12.json
-- spec/parsing/fixtures/fail13.json
-- spec/parsing/fixtures/fail14.json
-- spec/parsing/fixtures/fail19.json
-- spec/parsing/fixtures/fail20.json
-- spec/parsing/fixtures/fail21.json
-- spec/parsing/fixtures/fail22.json
-- spec/parsing/fixtures/fail23.json
-- spec/parsing/fixtures/fail24.json
-- spec/parsing/fixtures/fail25.json
-- spec/parsing/fixtures/fail27.json
-- spec/parsing/fixtures/fail28.json
-- spec/parsing/fixtures/fail3.json
-- spec/parsing/fixtures/fail4.json
-- spec/parsing/fixtures/fail5.json
-- spec/parsing/fixtures/fail6.json
-- spec/parsing/fixtures/fail9.json
-- spec/parsing/fixtures/pass.array.json
-- spec/parsing/fixtures/pass.codepoints_from_unicode_org.json
-- spec/parsing/fixtures/pass.contacts.json
-- spec/parsing/fixtures/pass.db100.xml.json
-- spec/parsing/fixtures/pass.db1000.xml.json
-- spec/parsing/fixtures/pass.dc_simple_with_comments.json
-- spec/parsing/fixtures/pass.deep_arrays.json
-- spec/parsing/fixtures/pass.difficult_json_c_test_case.json
-- spec/parsing/fixtures/pass.difficult_json_c_test_case_with_comments.json
-- spec/parsing/fixtures/pass.doubles.json
-- spec/parsing/fixtures/pass.empty_array.json
-- spec/parsing/fixtures/pass.empty_string.json
-- spec/parsing/fixtures/pass.escaped_bulgarian.json
-- spec/parsing/fixtures/pass.escaped_foobar.json
-- spec/parsing/fixtures/pass.item.json
-- spec/parsing/fixtures/pass.json-org-sample1.json
-- spec/parsing/fixtures/pass.json-org-sample2.json
-- spec/parsing/fixtures/pass.json-org-sample3.json
-- spec/parsing/fixtures/pass.json-org-sample4-nows.json
-- spec/parsing/fixtures/pass.json-org-sample4.json
-- spec/parsing/fixtures/pass.json-org-sample5.json
-- spec/parsing/fixtures/pass.map-spain.xml.json
-- spec/parsing/fixtures/pass.ns-invoice100.xml.json
-- spec/parsing/fixtures/pass.ns-soap.xml.json
-- spec/parsing/fixtures/pass.numbers-fp-4k.json
-- spec/parsing/fixtures/pass.numbers-fp-64k.json
-- spec/parsing/fixtures/pass.numbers-int-4k.json
-- spec/parsing/fixtures/pass.numbers-int-64k.json
-- spec/parsing/fixtures/pass.twitter-search.json
-- spec/parsing/fixtures/pass.twitter-search2.json
-- spec/parsing/fixtures/pass.unicode.json
-- spec/parsing/fixtures/pass.yelp.json
-- spec/parsing/fixtures/pass1.json
-- spec/parsing/fixtures/pass2.json
-- spec/parsing/fixtures/pass3.json
-- spec/parsing/fixtures_spec.rb
-- spec/parsing/large_number_spec.rb
-- spec/parsing/one_off_spec.rb
-- spec/projection/project_file.rb
-- spec/projection/projection.rb
-- spec/rcov.opts
-- spec/spec_helper.rb
+test_files: []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/encoding/encoding_spec.rb
new/spec/encoding/encoding_spec.rb
--- old/spec/encoding/encoding_spec.rb 2018-07-27 18:41:51.000000000 +0200
+++ new/spec/encoding/encoding_spec.rb 2022-05-26 20:26:33.000000000 +0200
@@ -230,6 +230,16 @@
expect(s.read).to eql("{\"foo\":\"bar\"}")
end
+ it "should encode all integers correctly" do
+ 0.upto(129).each do |b|
+ b = 1 << b
+ [b, b-1, b-2, b+1, b+2].each do |i|
+ expect(Yajl::Encoder.encode(i)).to eq(i.to_s)
+ expect(Yajl::Encoder.encode(-i)).to eq((-i).to_s)
+ end
+ end
+ end
+
it "should not encode NaN" do
expect {
Yajl::Encoder.encode(0.0/0.0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yajl-ruby.gemspec new/yajl-ruby.gemspec
--- old/yajl-ruby.gemspec 2018-07-27 18:41:52.000000000 +0200
+++ new/yajl-ruby.gemspec 2022-05-26 20:26:33.000000000 +0200
@@ -5,16 +5,13 @@
s.version = Yajl::VERSION
s.license = "MIT"
s.authors = ["Brian Lopez", "Lloyd Hilaiel"]
- s.date = Time.now.utc.strftime("%Y-%m-%d")
s.email = %q{[email protected]}
s.extensions = ["ext/yajl/extconf.rb"]
s.files = `git ls-files`.split("\n")
- s.homepage = %q{http://github.com/brianmario/yajl-ruby}
+ s.homepage = %q{https://github.com/brianmario/yajl-ruby}
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.4.2}
s.summary = %q{Ruby C bindings to the excellent Yajl JSON stream-based
parser library.}
- s.test_files = `git ls-files spec examples`.split("\n")
- s.required_ruby_version = ">= 1.8.6"
+ s.required_ruby_version = ">= 2.6.0"
# tests
s.add_development_dependency 'rake-compiler'