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: 1 addition & 1 deletion ext/syck/implicit.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "ruby/ruby.h"
#include "syck.h"

#define YYCTYPE char
#define YYCTYPE unsigned char
#define YYCURSOR cursor
#define YYMARKER marker
#define YYLIMIT limit
Expand Down
12 changes: 12 additions & 0 deletions test/test_boolean.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,17 @@ def test_n
assert_equal "n", Syck.load("--- n")
assert_equal "N", Syck.load("--- N")
end

###
# https://github.com/ruby/syck/issues/22
# A boolean-like prefix followed by a non-ASCII byte must not be
# matched as a boolean
def test_bool_prefix_with_non_ascii
assert_equal "Noémie", Syck.load("--- Noémie")
assert_equal ["Noémie"], Syck.load("--- [Noémie]")
assert_equal "Yeså", Syck.load("--- Yeså")
assert_equal "trueé", Syck.load("--- trueé")
assert_equal "nullé", Syck.load("--- nullé")
end
end
end