Skip to content

Capability Matrix ​

対応状況はカテゴリ単位で管理する。個別のメソッドや gem の完全な列挙はせず、 実例は tests/scenarios/ と plugin の実装を参照する。

  • supported: 現在の主要経路で回帰テストがある
  • partial: 静的に追える範囲だけ対応する
  • experimental: 仕様・網羅性が未確定
  • planned: 未着手

Ruby ​

分野状態代表的な範囲
定義・dispatch・visibilitysupportedclass / module / mixin / constant / method / super
変数・flowsupportedlocal / ivar(method 内の再代入・分岐・複合代入) / 多重代入 / narrowing(標準 Class#=== による postfix の local 代入を含む) / 分岐間のlocal相関 / rescue
block・高階 APIsupportedProc、lambda、yield、Enumerable、Enumerator、Lazy
collection shapesupportedArray、Hash、Set、Tuple、Record
pattern matchingpartialversion gate、array / hash / find binding、literal / expression subject のcapture型維持、guard 内の capture、case/in の不一致は例外経路
動的定義partial静的な名前の define_method、attr_*、Struct.new、Data.define(位置引数・キーワード引数の new 呼び出しからmember型を推定)
runtime-only meta programmingpartial未知の名前・object identity は untyped
深さ・union・shape の制限supported上限超過時は安全に untyped

主な scenario は tests/scenarios/ruby/ にある。

型情報と診断 ​

分野状態代表的な範囲
Ruby source inferencesupportedCLI / LSP / scenario の主経路
.rbs / stdlib RBSsupportedlazy load、generic、overload、interface
inline RBSsupported#:、# @rbs、block signature、type alias
Sorbet sig / .rbiexperimentalT::Struct、T::Enum、assertion、lazy merge
型診断supported確実な argument / return mismatch、既知の missing method / constant
experimental diagnosticsexperimentalarity、union member missing method

RBS scenario は tests/scenarios/ruby/rbs_input/、 inline RBS は tests/scenarios/ruby/rbs_comment/、 Sorbet は tests/scenarios/sorbet/ に置く。

DSL / framework ​

分野状態備考
ActiveRecord / ActiveModelsupportedassociation、scope、enum、attribute、schema
ActiveSupportsupportedConcern、delegate、class attribute、core extension、try / try! の nil-safe 呼び出し
ActionController / ActionMailer / ActiveJobsupportedclass-body DSL と主要 instance API
routes / structure.sqlsupportedRails project fixture を含む
RSpec structural DSLsupportedlet、subject、described_class の lexical scope
Devise / Doorkeeper / policysupportedplugin による scope / policy
Grape / GraphQL / AMSpartialplugin ごとに静的に追える範囲
その他の gempartialplugin がある API のみ
GitLab in-treesupportedPresenter、CurrentSettings、Metrics、EE 拡張
Redmine の動的登録partialruntime DSL は推測せず、外部定義を利用

Rails scenario は tests/scenarios/rails/ に置く。対応 gem の 有効化と実装は src/inference/plugins/ を正とする。

Ruby / Rails version ​

分野状態
Ruby version detection / syntax gatesupported
Rails version detection / relation gatesupported(6.1〜8.x の主要経路)