Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Oct 21, 2024
1 parent e1c05ce commit 1897931
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM mcr.microsoft.com/devcontainers/ruby:3.3-bookworm
RUN apt-get update -y && apt-get install -y ragel
WORKDIR /app
CMD [ "bash" ]
11 changes: 11 additions & 0 deletions bin/dev-console
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# Since pitchfork rely on a bunch of Linux features
# this script gives a quick dev environment for macOS
# and Windows contributors.
runner="docker"
if ! command -v docker >/dev/null 2>&1; then
runner="podman"
fi

exec "${runner}" run -v $PWD:/app -it $("${runner}" build -q .)
Binary file added ext/json/ext/generator.so
Binary file not shown.
Binary file added ext/json/ext/generator/generator.so
Binary file not shown.
Binary file added ext/json/ext/parser.so
Binary file not shown.
1 change: 1 addition & 0 deletions ext/json/ext/parser/parser.rl
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ RBIMPL_ATTR_NORETURN()
static void raise_parse_error(const char *format, const char *start)
{
size_t len = strnlen(start, PARSE_ERROR_FRAGMENT_LEN);
fprintf(stderr, "strnlen = %ld\n", len);
const char *ptr = start;
if (len == PARSE_ERROR_FRAGMENT_LEN) {
char buffer[PARSE_ERROR_FRAGMENT_LEN + 1];
Expand Down
Binary file added ext/json/ext/parser/parser.so
Binary file not shown.
1 change: 1 addition & 0 deletions test/json/json_parser_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ def test_parse_error_message_length
end

def test_parse_error_incomplete_hash
puts $LOADED_FEATURES.grep(/json/)
error = assert_raise(JSON::ParserError) do
JSON.parse('{"input":{"firstName":"Bob","lastName":"Mob","email":"[email protected]"}')
end
Expand Down

0 comments on commit 1897931

Please sign in to comment.