diff --git a/.github/workflows/source-gem.yml b/.github/workflows/source-gem.yml index 961902a07..7c1c3deae 100644 --- a/.github/workflows/source-gem.yml +++ b/.github/workflows/source-gem.yml @@ -44,19 +44,19 @@ jobs: include: - os: windows ruby: "head" - PGVERSION: 17.0-1-windows-x64 - PGVER: "17" + PGVERSION: 18.0-1-windows-x64 + PGVER: "18" - os: windows ruby: "3.2" PGVERSION: 10.20-1-windows-x64 PGVER: "10" - os: windows ruby: "mswin" - PGVERSION: 17.0-1-windows-x64 - PGVER: "17" + PGVERSION: 18.0-1-windows-x64 + PGVER: "18" - os: ubuntu ruby: "head" - PGVER: "17" + PGVER: "18" - os: ubuntu ruby: "3.2" PGVER: "12" @@ -69,11 +69,11 @@ jobs: PGVER: "14" - os: ubuntu ruby: "truffleruby-head" - PGVER: "17" + PGVER: "18" - os: macos ruby: "head" - PGVERSION: 17.0-1-osx - PGVER: "17" + PGVERSION: 18.0-2-osx + PGVER: "18" runs-on: ${{ matrix.os }}-${{ matrix.os_ver || 'latest' }} env: @@ -162,3 +162,8 @@ jobs: run: | ridk exec cat c:/rubyinstaller-head-*/lib/ruby/gems/*/extensions/*/*/*/mkmf.log || ridk exec cat d:/rubyinstaller-head-*/lib/ruby/gems/*/extensions/*/*/*/mkmf.log ridk exec gcc -v + + - name: Print mkmf logs if job failed on Macos-head + if: ${{ failure() && matrix.os == 'macos' && matrix.ruby == 'head' }} + run: | + cat /Users/runner/.rubies/ruby-head/lib/ruby/gems/*/extensions/*/*/*/mkmf.log diff --git a/ext/errorcodes.def b/ext/errorcodes.def index b8f90935b..2e5d0b17d 100644 --- a/ext/errorcodes.def +++ b/ext/errorcodes.def @@ -88,8 +88,9 @@ register_error_class( "0Z002", klass ); } { - VALUE klass = define_error_class( "InvalidArgumentForXquery", "10" ); + VALUE klass = define_error_class( "InvalidArgumentForXquery", NULL ); register_error_class( "10608", klass ); + register_error_class( "10", klass ); } { VALUE klass = define_error_class( "CaseNotFound", NULL ); diff --git a/ext/errorcodes.rb b/ext/errorcodes.rb index 54feab531..44cd01ce8 100644 --- a/ext/errorcodes.rb +++ b/ext/errorcodes.rb @@ -28,7 +28,7 @@ def camelize(lower_case_and_underscored_word) sqlstate, ews, errcode_macro_name = $1, $2, $3 next unless ews=='E' - is_sqlclass = sqlstate[2..-1] == '000' + is_sqlclass = sqlstate[2..-1] == '000' || sqlstate == '10608' class_code = sqlstate[0,2] baseclass_code = is_sqlclass ? 'NULL' : class_code.inspect class_name = camelize(errcode_macro_name.sub('ERRCODE_', '').downcase)