Fix Utils module to not expect arguments for inspect

オープン 初心者向け
#2,107 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Hashim1999164 がすでに取り組んでいます。

2026年8月13日 から。

  • #2112 @Hashim1999164 による — オープン
  • #2116 @shivaansh74 による — オープン

評価

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

調査の方向性

Liquid::Utils.inspect から始め、issue に記載されている引数不足による失敗を再現してください。既存の実装と関連する spec を読んで期待されるデフォルトの動作を確認し、そのうえで引数なしで inspect を呼び出しても ArgumentError が発生しなくなっていることと、関連する spec が通ることを確認してください。

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

説明

Why

Hello. 👋

The Liquid::Utils.inspect method expects an object argument but, when not given, it'll throw an ArgumentError. This violates the Liskov Substitution Principle becauseObject (superclass) does not require you pass in any arguments.

How

To fix, can the method signature be something like this?

self.inspect object = nil, seen = {}

This would allow object to be optional instead of requried.

Notes

I tried monkey patching with nil but ended up with different spec failures so not sure what the default expectation is here but this definitely causes specs to fail in CI when using SimpleCov 1.0.0. Although, when running locally, I could not recreate this.

主要言語
Ruby
スター
11.9k
フォーク
1.6k
平均マージ
11時間 20分
マージ済み PR(30日)
2

環境構築

はじめの一歩

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

Shopify/liquid のほかの issue

Shopify/liquid の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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