Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ext/json/ext/parser/parser.c
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -1593,7 +1593,7 @@ case 8:
case 3:
if ( (*p) == 117 )
goto st4;
if ( 0 <= (*p) && (*p) <= 31 )
if ( 0 <= (signed char)(*p) && (*p) <= 31 )
goto st0;
goto st2;
st4:
Expand Down
1 change: 0 additions & 1 deletion json.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down