rspec testsuite fails with ruby4.0.0dev 2025-11-24

オープン
#63 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
ruby
領域
testing-qa

調査の方向性

参照されている Ruby 4.0.0dev の変更を適用した状態で RSpec スイートを実行し、spec/compliance_spec.rb、spec/implicit_conversion_spec.rb、spec/compliance/identifiers.json を調査してください。JSON::GeneratorError で報告された不正な UTF-8 データを追跡し、その後、identifiers fixture を削除せずに完全なテストスイートが読み込まれ、パスすることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Beginning with this ruby4.0.0dev commit:
https://github.com/ruby/ruby/commit/c7a84ae0bb8c6dab3463076d7e5ca9b6f89880f4

(Or for ruby/json: beginning with this commit:
https://github.com/ruby/json/commit/4f4551f993bf1642eb8e0a18152306c5b25b18ea
)

jmespath git head ( https://github.com/jmespath/jmespath.rb/commit/5e86ea7da2e954cc12f5b3a8383a43c0a65acba7 )
rspec testsuite fails like:

An error occurred while loading ./spec/compliance_spec.rb.
Failure/Error:
          describe("Given #{scenario['given'].to_json}") do
            scenario['cases'].each do |test_case|
              if test_case['error']
  
                it "the expression #{test_case['expression'].inspect} raises a #{test_case['error']} error" do
                  error_class = case test_case['error']
                                when 'runtime' then JMESPath::Errors::RuntimeError
                                when 'syntax' then JMESPath::Errors::SyntaxError
                                when 'invalid-type' then JMESPath::Errors::InvalidTypeError
                                when 'invalid-value' then JMESPath::Errors::InvalidValueError

JSON::GeneratorError:
  source sequence is illegal/malformed utf-8
# ./spec/compliance_spec.rb:12:in 'JSON::Ext::Generator::GeneratorMethods::Hash#to_json'
# ./spec/compliance_spec.rb:12:in 'block (4 levels) in <top (required)>'
# ./spec/compliance_spec.rb:11:in 'Array#each'
# ./spec/compliance_spec.rb:11:in 'block (3 levels) in <top (required)>'
# ./spec/compliance_spec.rb:10:in 'block (2 levels) in <top (required)>'
# ./spec/compliance_spec.rb:5:in 'Array#each'
# ./spec/compliance_spec.rb:5:in 'block in <top (required)>'
# ./spec/compliance_spec.rb:4:in '<top (required)>'

An error occurred while loading ./spec/implicit_conversion_spec.rb.
Failure/Error:
              describe("Given #{scenario['given'].to_json}") do
                scenario['cases'].each do |test_case|
                  next if test_case['error']
                  it "searching #{test_case['expression'].inspect} returns #{test_case['result'].to_json}" do
                    result = JMESPath.search(test_case['expression'], Wrapper.wrap(scenario['given']))
  
                    expect(JMESPath::Util.as_json(result)).to eq(test_case['result'])
                  end
                end
              end

JSON::GeneratorError:
  source sequence is illegal/malformed utf-8
# ./spec/implicit_conversion_spec.rb:65:in 'JSON::Ext::Generator::GeneratorMethods::Hash#to_json'
# ./spec/implicit_conversion_spec.rb:65:in 'block (5 levels) in <module:JMESPath>'
# ./spec/implicit_conversion_spec.rb:64:in 'Array#each'
# ./spec/implicit_conversion_spec.rb:64:in 'block (4 levels) in <module:JMESPath>'
# ./spec/implicit_conversion_spec.rb:63:in 'block (3 levels) in <module:JMESPath>'
# ./spec/implicit_conversion_spec.rb:58:in 'Array#each'
# ./spec/implicit_conversion_spec.rb:58:in 'block (2 levels) in <module:JMESPath>'
# ./spec/implicit_conversion_spec.rb:57:in 'block in <module:JMESPath>'
# ./spec/implicit_conversion_spec.rb:37:in '<module:JMESPath>'
# ./spec/implicit_conversion_spec.rb:36:in '<top (required)>'


Finished in 0.00007 seconds (files took 0.5614 seconds to load)
0 examples, 0 failures, 2 errors occurred outside of examples

spec/compliance/identifiers.json is failing (if I remove this json file, rspec testsuite passes).

主要言語
Ruby
スター
167
フォーク
45
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jmespath/jmespath.rb のほかの issue

jmespath/jmespath.rb の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。