CodeSampleX

サンプル

set 1.1.1: Demonstrate that Set#merge accepts multiple enumerable arguments and zero arguments rather than strictly requiring a single argument.

検証済みサンプル — gem set 1.1.1: Demonstrate that Set#merge accepts multiple enumerable arguments and zero arguments rather than strictly requiring a single…

sha256:2d9066b6b344ce373a3c25794dab5a3006dc7b40a08549af8cb903a9892b0167

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 ruby linux x64 ruby ruby bundler

検証実行環境

環境 コントラクト ステージ 実行日
ruby 3 · linux debian/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-17
ruby 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-18

ケース

HOW
ゴール
Demonstrate that Set#merge accepts multiple enumerable arguments and zero arguments rather than strictly requiring a single argument.
パッケージ
シンボル
  • Set#merge
環境
ruby
作成日
2026-08-17T02:46:35Z

コントラクト

  1. Set#merge accepts multiple enumerable arguments in a single invocation, mutating the receiver in place with elements from all passed collections and returning self.
  2. Set[1, 2].merge([3, 4], Set[4, 5], 6..7) returns the mutated receiver containing all 7 distinct elements.
  3. Set[1, 2].merge() with zero arguments leaves the receiver unchanged and returns self without raising ArgumentError.

ファイル

  • Gemfile
  • Gemfile.lock
  • NOTES.md
  • csx.json
  • test/contract.rb

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed