diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-25 17:16:20 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 17:16:20 +0900 |
commit | ee70abf60cf943d1f52ec55f9aab2fcd1414dbbe (patch) | |
tree | e9ec26647e9832b78491461c0d37d79ba4d9484b | |
parent | e1d0af6ca7f9e32e3ac7b66f286a7f02283a3cd3 (diff) | |
parent | 9c29ce3ad51e0cce80302e63a438c2927c8d99b5 (diff) | |
download | json-ee70abf60cf943d1f52ec55f9aab2fcd1414dbbe.tar.gz |
Merge pull request #418 from nobu/sync-ruby
Sync ruby
-rw-r--r-- | Rakefile | 2 | ||||
-rw-r--r-- | ext/json/ext/parser/parser.c | 6 | ||||
-rw-r--r-- | json.gemspec | 1 |
3 files changed, 5 insertions, 4 deletions
@@ -331,6 +331,8 @@ else end src = File.read("parser.c").gsub(/[ \t]+$/, '') src.gsub!(/^static const int (JSON_.*=.*);$/, 'enum {\1};') + src.gsub!(/0 <= \(\*p\) && \(\*p\) <= 31/, "0 <= (signed char)(*p) && (*p) <= 31") + src[0, 0] = "/* This file is automatically generated from parser.rl by using ragel */" File.open("parser.c", "w") {|f| f.print src} end end diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c index bc4ac46..e4a3056 100644 --- a/ext/json/ext/parser/parser.c +++ b/ext/json/ext/parser/parser.c @@ -1,4 +1,4 @@ - +/* This file is automatically generated from parser.rl by using ragel */ #line 1 "parser.rl" #include "../fbuffer/fbuffer.h" #include "parser.h" @@ -1563,7 +1563,7 @@ case 2: case 34: goto tr2; case 92: goto st3; } - if ( 0 <= (*p) && (*p) <= 31 ) + if ( 0 <= (signed char)(*p) && (*p) <= 31 ) goto st0; goto st2; tr2: @@ -1593,7 +1593,7 @@ st3: case 3: if ( (*p) == 117 ) goto st4; - if ( 0 <= (*p) && (*p) <= 31 ) + if ( 0 <= (signed char)(*p) && (*p) <= 31 ) goto st0; goto st2; st4: diff --git a/json.gemspec b/json.gemspec index a101aba..0c72e82 100644 --- a/json.gemspec +++ b/json.gemspec @@ -131,7 +131,6 @@ Gem::Specification.new do |s| s.licenses = ["Ruby"] s.rdoc_options = ["--title", "JSON implemention for Ruby", "--main", "README.md"] s.required_ruby_version = Gem::Requirement.new(">= 2.0") - s.rubygems_version = "3.0.2" s.summary = "JSON Implementation for Ruby" s.test_files = ["tests/test_helper.rb"] |