네트워크가 찾아낸 것
아래 각 줄은 의견이 아니라 측정입니다. 모두 공개된 샘플로 연결되며, 그 샘플의 contract는 네트워크를 끈 고정 컨테이너에서 실행되므로 직접 다시 돌려 보고 반박할 수 있습니다.
운영체제와 런타임은 연결된 샘플에 실제 기록된 환경을 기준으로 합니다. 해당 값이 없는 항목은 필터 선택 시 제외됩니다.
597개 발견, 8개 생태계.
- cargo
- composer
- gem
- golang
- hex
- npm
- pub
- pypi
샘플이 말하고, 계약이 측정한 것
발행된 샘플이 측정한 결과 중 276–300번째입니다(전체 568개).
-
gem샘플 컨트랙트ruby · linux/x64sorbet-runtime@0.6.13427
믿는 것A method marked with `sig(:final)` is always rejected when a class overrides it through include.
측정한 것Overriding a `sig(:final)` method by defining the same instance method in a class after including a module with that final method succeeds while final checks are not enabled.
-
gem샘플 컨트랙트ruby · linux/x64sorbet-runtime@0.6.13427
믿는 것A model that believes `T.must` rejects all falsey values would expect `false` to raise and never be returned.
측정한 것Calling `T.must(false)` returns `false`, proving `T.must` only rejects nil, while calling `T.must(nil)` fails.
-
gem샘플 컨트랙트ruby · linux/x64sorbet-runtime@0.6.13427
믿는 것JSON.dump on a T::Enum instance raises NoMethodError instead of serializing it
측정한 것JSON.dump(Color::RED) returns the JSON string "red" using the enum's serialized value.
-
gem샘플 컨트랙트ruby · linux/x64sinatra@4.2.1
믿는 것Sinatra automatically removes uploaded file temporary files after the request completes
측정한 것A multipart upload sent with an allowed localhost Host reaches the Sinatra route, and the received tempfile still exists after the request returns.
-
gem샘플 컨트랙트ruby · linux/x64set@1.1.1
믿는 것Changing an object's #hash after adding it to a Set updates its position in the Set automatically
측정한 것After an element's hash changes, Set#include? returns false while Set#delete? returns nil and the stale entry still counts toward Set#size.
-
gem샘플 컨트랙트ruby · linux/x64set@1.1.1
믿는 것Set[1,2,3].to_json returns the string "[1,2,3]" because Set is an Enumerable collection and the json gem is expected to serialize it like an Array.
측정한 것Set[1,2,3].to_json returns a JSON string literal (begins with a double-quote character) rather than the JSON array "[1,2,3]", because Set inherits to_json from JSON::Ext::Generator::GeneratorMethods::Object which delegates to to_s.to_json
-
gem샘플 컨트랙트ruby · linux/x64set@1.1.1
믿는 것Calling `Set#intersect?` with a scalar will simply return `false`.
측정한 것Set#intersect?(4) raises `ArgumentError` with message `value must be enumerable`, so invalid scalar input fails instead of returning a boolean.
-
gem샘플 컨트랙트ruby · linux/x64set@1.1.1
믿는 것Set#merge accepts only a single enumerable argument at a time, requiring chained or sequential merge calls to combine multiple collections.
측정한 것Set#merge accepts multiple enumerable arguments in a single invocation, mutating the receiver in place with elements from all passed collections and returning self.
-
gem샘플 컨트랙트ruby · linux/x64set@1.1.1
믿는 것Preloading `sorted_set` via `RUBYOPT=-rsorted_set` is a valid way to get deprecated set behavior on this Ruby stream.
측정한 것A fresh Ruby process started with `RUBYOPT=-rset` starts normally and can construct `Set`, while the same process started with `RUBYOPT=-rsorted_set` exits before executing the script body with `cannot load such file -- sorted_set`.
-
gem샘플 컨트랙트ruby · linux/x64rack-test@2.2.0
믿는 것A `Rack::Test::UploadedFile` sent through `post` is cleaned up by rack-test, so its backing tempfile is automatically closed when the request finishes.
측정한 것After a successful multipart `post`, the uploaded tempfile used by `Rack::Test::UploadedFile` remains open.
-
gem샘플 컨트랙트ruby · linux/x64set@1.1.1
믿는 것Passing a block to Set.new filters matching elements, Set#map preserves the Set type with duplicate elimination, in-place filters always return the receiver, and Set#add returns a boolean indicating whether insertion occurred.
측정한 것assert Set.new with a block transforms each element before insertion rather than filtering elements, inserting the boolean return values
-
gem샘플 컨트랙트ruby · linux/x64rack-test@2.2.0
믿는 것Passing a Hash payload to Rack::Test request methods with a JSON Content-Type header automatically serializes the body as JSON.
측정한 것assert posting a Hash with application/json Content-Type sends a form-urlencoded query string and fails JSON parsing unless explicitly passed as a serialized JSON string
-
gem샘플 컨트랙트ruby · linux/x64rack-test@2.2.0
믿는 것Calling set_cookie with a secure attribute on a session stores the cookie in the jar for HTTPS requests and accepts a URI string.
측정한 것assert calling set_cookie with a secure attribute without an explicit URI object silently drops the cookie because default URI lacks an HTTPS scheme, while passing a URI string raises NoMethodError
-
gem샘플 컨트랙트ruby · linux/x64rack-protection@4.2.1
믿는 것Protection middleware short-circuits the request pipeline before the inner app runs, so an app behind JsonCsrf only executes when the request is allowed
측정한 것JsonCsrf#call invokes app.call(env) unconditionally before deciding whether to deny, so the inner application executes — and its side effects occur — even when the middleware ultimately returns 403
-
gem샘플 컨트랙트ruby · linux/x64rack-protection@4.2.1
믿는 것Rack::Protection::HostAuthorization rejects requests with a bare single-label Host header
측정한 것A direct Rack::Protection::HostAuthorization middleware returns status 200 for a bare single-label Host header when no permitted_hosts restriction is configured.
-
gem샘플 컨트랙트ruby · linux/x64rack-protection@4.2.1
믿는 것Developers should expect `Rack::Protection::AuthenticityToken.token(session)` to produce a route-specific token by default.
측정한 것Leaving `path` and `method` unspecified when calling `Rack::Protection::AuthenticityToken.token(session)` makes the token validate on any POST route, so it is global by default.
-
gem샘플 컨트랙트ruby · linux/x64rack-protection@4.2.1
믿는 것A cross-origin GET request to a JSON endpoint with an untrusted Origin header is rejected with HTTP 403 when JsonCsrf and HttpOrigin are both active.
측정한 것A cross-origin JSON GET with an untrusted Origin returns 200 because JsonCsrf defers to HttpOrigin while HttpOrigin treats GET as safe
-
gem샘플 컨트랙트ruby · linux/x64json@2.9.1
믿는 것JSON.generate and JSON.parse reject top-level primitive scalars like strings, booleans, and numbers unless wrapped in objects or arrays, and symbolize_keys: true transforms parsed keys into Ruby symbols.
측정한 것assert JSON.generate and JSON.parse serialize and deserialize top-level primitive strings, numbers, booleans, and nil directly without quirks mode, while symbolize_keys is silently ignored leaving string keys unless symbolize_names is used
-
gem샘플 컨트랙트ruby · linux/x64json@2.9.1
믿는 것JSON.parse validates all escaped Unicode surrogate sequences identically by rejecting any unpaired surrogate with a ParserError.
측정한 것assert JSON.parse accepts lone low surrogates like \uDC00 without raising ParserError, returning an invalid UTF-8 string that fails when passed to JSON.generate, while lone high surrogates like \uD800 raise ParserError immediately
-
gem샘플 컨트랙트ruby · linux/x64json@2.9.1
믿는 것Passing an IO object to JSON.dump or JSON.load automatically closes or rewinds the stream upon completion, returns the serialized JSON string from dump, and streams writes and reads incrementally without buffering full documents in memory.
측정한 것assert JSON.dump and JSON.load leave passed IO streams open at EOF rather than closing or rewinding them, dump returns the IO object instead of the JSON string, and both operations buffer the entire payload in memory in a single monolithic read or write rather than streaming chunks
-
gem샘플 컨트랙트ruby · linux/x64json@2.9.1
믿는 것JSON.load uses its proc return value to transform parsed nodes like a JSON reviver, while JSON.create_id modifies process-global state shared across all threads.
측정한 것assert JSON.load invokes its proc in post-order depth-first traversal but ignores the proc return value, leaving parsed elements unchanged unless mutated in-place
-
gem샘플 컨트랙트ruby · linux/x64json@2.9.1
믿는 것JSON.dump is a direct alias for JSON.generate that defaults to a 100-level recursion ceiling and raises JSON::GeneratorError on non-finite floats like NaN and Infinity.
측정한 것JSON.dump defaults max_nesting to false and allow_nan to true, serializing 100+ deep nested structures and NaN floats without raising the NestingError or GeneratorError that JSON.generate enforces
-
gem샘플 컨트랙트ruby · linux/x64json@2.9.1
믿는 것JSON.parse! is an exception-raising strict mode of JSON.parse, while requiring json automatically provides bidirectional structured JSON serialization for core types like Range and Regexp.
측정한 것assert JSON.parse rejects NaN and nesting depths over 100 with ParserError and NestingError whereas JSON.parse! relaxes limits to allow NaN and unbounded nesting by default
-
gem샘플 컨트랙트ruby · linux/x64faraday-net_http@3.4.4
믿는 것Setting a request timeout of 0 or passing proxy credentials inside the URI object disables timeouts and authenticates the proxy connection in Faraday's Net::HTTP adapter.
측정한 것Setting request timeout to 0 configures Net::HTTP read, open, and write timeouts to 0 seconds rather than disabling timeouts or falling back to defaults because 0 is truthy in Ruby.
-
gem샘플 컨트랙트ruby · linux/x64faraday-net_http@3.4.4
믿는 것Passing an IO object as a request body automatically streams the payload without explicit transfer headers and closes the stream on completion, while Faraday::Connection retains persistent TCP sockets across calls.
측정한 것Passing an IO stream as a request body without an explicit Content-Length or chunked Transfer-Encoding header raises an ArgumentError, and even after successful transfer, NetHttp leaves the caller's IO stream open at EOF.
여기 있는 줄을 확인하는 방법
샘플을 열고 contract를 읽고 실행하십시오. contract는 그 샘플 자신의 테스트입니다. 네트워크를 끈 고정 컨테이너에서 실행되고, 그 실행의 서명된 영수증이 네트워크에 저장됩니다. 여기 있는 어떤 것도 라이브러리에 대한 우리의 해석에 기대지 않습니다. 라이브러리가 실제로 한 일에만 기댑니다.
게시된 샘플 중 일부는 이 페이지에 없습니다. 계약은 통과했고 샘플도 살아 있지만, 그 계약에 문장으로 읽힐 줄이 없기 때문입니다. expect(x).toBe(1) 같은 단언은 그것이 검사하는 믿음 옆에 놓아도 독자에게 아무것도 말해주지 않습니다. 읽을 수 없는 근거를 싣기보다는 뺀다는 쪽을 택했습니다.