샘플
activesupport 8.1.3.1: ActiveSupport.gem_version returns a Gem::Version instance representing the ActiveSupport version string
검증된 샘플 — gem activesupport 8.1.3.1: ActiveSupport.gem_version returns a Gem::Version instance representing the ActiveSupport version string. ruby 3 · linux…
sha256:19e4e8eba00e8dca2bf9eb099975a3c5176e2893cc7cebf61d6c84f5d3412a9b
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
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- 목표
- ActiveSupport.gem_version returns a Gem::Version instance representing the ActiveSupport version string
- 심벌
-
- ActiveSupport.gem_version
- 환경
- ruby
- 생성일
- 2026-08-17T21:34:31Z
컨트랙트
- ActiveSupport.gem_version returns a Gem::Version instance with version string 8.1.3.1 that supports semantic comparisons and segments decomposition.
- ActiveSupport.gem_version can be loaded independently via active_support/gem_version without requiring all of ActiveSupport.
- ActiveSupport.version returns the same Gem::Version instance when active_support/version is loaded.
파일
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
소스
source "https://rubygems.org"
gem "activesupport", "8.1.3.1"
GEM
remote: https://rubygems.org/
specs:
activesupport (8.1.3.1)
base64
benchmark
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.9)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
drb (2.2.1)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
logger (1.7.0)
minitest (5.25.4)
mutex_m (0.3.0)
securerandom (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uri (1.0.3)
PLATFORMS
ruby
x86_64-linux
DEPENDENCIES
activesupport (= 8.1.3.1)
BUNDLED WITH
2.6.2
# ActiveSupport Version Metadata Introspection
`search_known_solution` answered `NO_SAFE_MATCH` for `ActiveSupport.gem_version` on version `8.1.3.1`.
## Pinned Release
- `activesupport` `8.1.3.1` pinned in `Gemfile` and `Gemfile.lock`.
## Observed Behavior
- `ActiveSupport.gem_version` returns an instance of `Gem::Version` initialized from `ActiveSupport::VERSION::STRING` (`"8.1.3.1"`).
- Calling `ActiveSupport.gem_version` returns a `Gem::Version` object (not a primitive `String`), enabling direct usage with `Gem::Requirement` and semantic comparison operators (`<`, `<=`, `==`, `>=`, `>`).
- Calling `.segments` on the returned version decomposes the release into `[8, 1, 3, 1]`.
- Calling `.prerelease?` on `8.1.3.1` returns `false` because the 4th component is purely numerical rather than a pre-release tag (such as `rc` or `beta`).
- `ActiveSupport.gem_version` can be loaded in isolation by requiring `active_support/gem_version` without needing to require the full `active_support` gem bundle.
- Requiring `active_support/version` defines `ActiveSupport.version`, which returns the exact same `Gem::Version` instance as `ActiveSupport.gem_version`.
{"case":{"caseId":"case:sha256:bcc2e38b9e0a7622288541c6ad021cc75799a23669d3b3dddad9f08b36e7403d","contract":["ActiveSupport.gem_version returns a Gem::Version instance with version string 8.1.3.1 that supports semantic comparisons and segments decomposition.","ActiveSupport.gem_version can be loaded independently via active_support/gem_version without requiring all of ActiveSupport.","ActiveSupport.version returns the same Gem::Version instance when active_support/version is loaded."],"goal":"ActiveSupport.gem_version returns a Gem::Version instance representing the ActiveSupport version string","kind":"HOW","packages":["pkg:gem/activesupport@8.1.3.1"],"schemaVersion":1,"symbols":["ActiveSupport.gem_version"]},"contractCommand":["ruby","test/contract.rb"],"environment":{"arch":"x64","ecosystem":"gem","executionContext":"ruby","language":"ruby","os":"linux","packageManager":"bundler","runtime":"ruby","schemaVersion":1},"license":"MIT-0","packages":["pkg:gem/activesupport@8.1.3.1"],"schemaVersion":1,"symbols":["ActiveSupport.gem_version"],"verifierAdapter":"rubygems@1"}
# frozen_string_literal: true
require "active_support/gem_version"
# ActiveSupport.gem_version returns a Gem::Version object
version = ActiveSupport.gem_version
raise "Expected Gem::Version instance, got #{version.class}" unless version.is_a?(Gem::Version)
raise "Expected version string '8.1.3.1', got '#{version.to_s}'" unless version.to_s == "8.1.3.1"
raise "Expected version '8.1.3.1', got '#{version.version}'" unless version.version == "8.1.3.1"
# Segments breakdown into [8, 1, 3, 1]
raise "Expected segments [8, 1, 3, 1], got #{version.segments.inspect}" unless version.segments == [8, 1, 3, 1]
# Prerelease check returns false for standard 4-digit patch release
raise "Expected prerelease? to be false" if version.prerelease?
# Version comparison semantics with Gem::Version
raise "Expected gem_version >= 8.1.0" unless version >= Gem::Version.new("8.1.0")
raise "Expected gem_version == 8.1.3.1" unless version == Gem::Version.new("8.1.3.1")
raise "Expected gem_version > 8.1.3" unless version > Gem::Version.new("8.1.3")
raise "Expected gem_version < 8.2.0" unless version < Gem::Version.new("8.2.0")
# Compatibility with Gem::Requirement
requirement = Gem::Requirement.new("~> 8.1.3")
raise "Expected requirement '~> 8.1.3' to be satisfied" unless requirement.satisfied_by?(version)
# VERSION module constants match individual segments
raise "Expected MAJOR == 8" unless ActiveSupport::VERSION::MAJOR == 8
raise "Expected MINOR == 1" unless ActiveSupport::VERSION::MINOR == 1
raise "Expected TINY == 3" unless ActiveSupport::VERSION::TINY == 3
raise "Expected STRING == '8.1.3.1'" unless ActiveSupport::VERSION::STRING == "8.1.3.1"
# Requiring active_support/version provides ActiveSupport.version as an alias
require "active_support/version"
raise "Expected ActiveSupport.version == ActiveSupport.gem_version" unless ActiveSupport.version == ActiveSupport.gem_version
puts "Contract passed: ActiveSupport.gem_version correctly verified on 8.1.3.1"