diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index b5732e1..98954cf 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -18,7 +18,7 @@ permissions: jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: ruby-version: @@ -32,9 +32,8 @@ jobs: - '2.7' - '3.0' - '3.1' - - jruby-9.1.17.0 - - jruby-9.2.21.0 - - jruby-9.3.6.0 + - jruby-9.4.7.0 + - jruby-10.0.2.0 steps: - uses: actions/checkout@v3 diff --git a/ext/ios_parser/c_lexer/lexer.c b/ext/ios_parser/c_lexer/lexer.c index 3c056c7..d5601e8 100644 --- a/ext/ios_parser/c_lexer/lexer.c +++ b/ext/ios_parser/c_lexer/lexer.c @@ -38,10 +38,10 @@ typedef struct LexInfo LexInfo; #define IS_SPACE(C) C == ' ' || C == '\t' || C == '\r' #define IS_NEWLINE(C) C == '\n' #define IS_COMMENT(C) C == '!' -#define IS_DIGIT(C) '0' <= C && C <= '9' +#define IS_DIGIT(C) (('0' <= C) && (C <= '9')) #define IS_DOT(C) C == '.' #define IS_DECIMAL(C) IS_DIGIT(C) || IS_DOT(C) -#define IS_LETTER(C) 'a' <= C && C <= 'z' || 'A' <= C && C <= 'Z' +#define IS_LETTER(C) (('a' <= C) && (C <= 'z')) || (('A' <= C) && (C <= 'Z')) #define IS_PUNCT(C) strchr("-+$:/,()|*#=<>!\"\\&@;%~{}'\"?[]_^`", C) #define IS_WORD(C) IS_DECIMAL(C) || IS_LETTER(C) || IS_PUNCT(C) #define IS_LEAD_ZERO(C) C == '0' @@ -201,7 +201,7 @@ static VALUE allocate(VALUE klass) { return Data_Wrap_Struct(klass, mark, deallocate, lex); } -static VALUE initialize(VALUE self, VALUE input_text) { +static VALUE initialize(VALUE self) { LexInfo *lex; Data_Get_Struct(self, LexInfo, lex); @@ -405,7 +405,7 @@ static void start_certificate(LexInfo *lex) { int is_banner_end_char(LexInfo *lex) { return CURRENT_CHAR(lex) == lex->banner_delimiter && - (0 < lex->pos && '\n' == lex->text[lex->pos - 1] || + ((0 < lex->pos && '\n' == lex->text[lex->pos - 1]) || '\n' == lex->text[lex->pos + 1]); } diff --git a/lib/ios_parser/version.rb b/lib/ios_parser/version.rb index 658d7ad..7c2b07b 100644 --- a/lib/ios_parser/version.rb +++ b/lib/ios_parser/version.rb @@ -1,7 +1,7 @@ module IOSParser class << self def version - '0.9.0' + '0.9.1' end end end