COMMIT String#to_r: Specify 1.9 method http://github.com/rubyspec/rubyspec/commit/dc29e9f4de4bc67a7fa7b132b8b82bcda85694ef COMMIT String#encoding: Started documenting 1.9 method... http://github.com/rubyspec/rubyspec/commit/0fb4a0502b357b6e9be09aae001e890a9e130aee COMMIT String#codepoints: Aliases #each_codepoint on 1.9 http://github.com/rubyspec/rubyspec/commit/bb86fc45d90a33389901801cde200d89edd24484 COMMIT String#each_codepoint: Specify 1.9 method http://github.com/rubyspec/rubyspec/commit/6350ae14a6f4e2206d56df20f55d71abe0b7895c COMMIT String#clear: Specify 1.9 method http://github.com/rubyspec/rubyspec/commit/80414358945539a7a31cfe7d824913e6e36c2738 COMMIT String#chr: Specify 1.9 method. http://github.com/rubyspec/rubyspec/commit/a1ceedb7bd024afc155c10e28242d715ca295a9a COMMIT String#lines: Aliases #each_line on 1.8.7+ http://github.com/rubyspec/rubyspec/commit/00b79426b366eee2e38f9953e1387dbcbb8592fd COMMIT Encoding: Specify constants. http://github.com/rubyspec/rubyspec/commit/c67211e6809759fa0bf759c7bd0e2d5bb54857fa COMMIT Encoding::InvalidByteSequenceError#incomplete_input?: Spec http://github.com/rubyspec/rubyspec/commit/a84ada99cdbe2c49a11f8905bb1bed1c2d9f60ab COMMIT String#chr: Significantly expanded for 1.9 enhancements http://github.com/rubyspec/rubyspec/commit/1a9a3ebd337e70dc41d39ee4e19d93904b354805 COMMIT String#ascii_only?: False for first non-US-ASCII char http://github.com/rubyspec/rubyspec/commit/59062211a88a04a17dfd9c687769112a03e3181f COMMIT String#ascii_only?: True for all 1-char US-ASCII Strings http://github.com/rubyspec/rubyspec/commit/d3693cb19dd2cdad95d163ddbabf709cf09fdaf3 COMMIT String#ascii_only?: Clarify that 'ASCII' means 'US-ASCII' http://github.com/rubyspec/rubyspec/commit/66ba18fd8bdbc3adc02c77da8fb243f4621b167d --- 20090622T080647 +++ 20090623T075541 @@ -1,9093 +1,9093 @@ IMAPTest#test_imaps_with_ca_file: s: . IMAPTest#test_starttls: s: . IMAPTest#test_unexpected_eof: s: . -MinitestSpec#test_needs_to_have_all_methods_named_well: s: . -MinitestSpec#test_needs_to_be_able_to_catch_a_minitest_assertion_exception: s: . MinitestSpec#test_needs_to_verify_non_nil: s: . +MinitestSpec#test_needs_to_verify_types_of_objects: s: . MinitestSpec#test_needs_to_verify_kinds_of_objects: s: . +MinitestSpec#test_needs_to_verify_non_identity: s: . +MinitestSpec#test_needs_raise_if_an_expected_exception_is_not_raised: s: . MinitestSpec#test_needs_to_verify_identity: s: . -MinitestSpec#test_needs_to_verify_regexp_matches: s: . -MinitestSpec#test_needs_to_catch_an_unexpected_exception: s: . -MinitestSpec#test_needs_to_verify_mismatch: s: . MinitestSpec#test_needs_to_verify_throw: s: . -MinitestSpec#test_needs_raise_if_an_expected_exception_is_not_raised: s: . -MinitestSpec#test_needs_to_verify_equality: s: . -MinitestSpec#test_needs_to_verify_nil: s: . -MinitestSpec#test_needs_to_verify_non_identity: s: . MinitestSpec#test_needs_to_verify_using_respond_to: s: . -MinitestSpec#test_needs_to_verify_inequality: s: . +MinitestSpec#test_needs_to_verify_nil: s: . +MinitestSpec#test_needs_to_catch_an_unexpected_exception: s: . MinitestSpec#test_needs_to_catch_an_expected_exception: s: . -MinitestSpec#test_needs_to_verify_floats_within_a_delta: s: . -MinitestSpec#test_needs_to_verify_types_of_objects: s: . +MinitestSpec#test_needs_to_have_all_methods_named_well: s: . +MinitestSpec#test_needs_to_verify_inequality: s: . +MinitestSpec#test_needs_to_verify_mismatch: s: . MinitestSpec#test_needs_to_verify_using_any_operator: s: . +MinitestSpec#test_needs_to_verify_floats_within_a_delta: s: . +MinitestSpec#test_needs_to_verify_regexp_matches: s: . +MinitestSpec#test_needs_to_verify_equality: s: . +MinitestSpec#test_needs_to_be_able_to_catch_a_minitest_assertion_exception: s: . NonString#test_6: s: . NonString#test_7: s: . OpenSSL::TestASN1#test_decode: s: . @@ -18202,6 +18202,59 @@ - returns nil when the given encoding is ASCII compatible - returns nil if called with an encoding it returned previously +/home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/encoding/converter/constants_spec.rb +Encoding::Converter::INVALID_MASK +- exists +- has a Fixnum value + +Encoding::Converter::INVALID_REPLACE +- exists +- has a Fixnum value + +Encoding::Converter::UNDEF_MASK +- exists +- has a Fixnum value + +Encoding::Converter::UNDEF_REPLACE +- exists +- has a Fixnum value + +Encoding::Converter::UNDEF_HEX_CHARREF +- exists +- has a Fixnum value + +Encoding::Converter::PARTIAL_INPUT +- exists +- has a Fixnum value + +Encoding::Converter::AFTER_OUTPUT +- exists +- has a Fixnum value + +Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR +- exists +- has a Fixnum value + +Encoding::Converter::CRLF_NEWLINE_DECORATOR +- exists +- has a Fixnum value + +Encoding::Converter::CR_NEWLINE_DECORATOR +- exists +- has a Fixnum value + +Encoding::Converter::XML_TEXT_DECORATOR +- exists +- has a Fixnum value + +Encoding::Converter::XML_ATTR_CONTENT_DECORATOR +- exists +- has a Fixnum value + +Encoding::Converter::XML_ATTR_QUOTE_DECORATOR +- exists +- has a Fixnum value + /home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/encoding/converter/convert_spec.rb Encoding::Converter#convert - returns a String @@ -18387,6 +18440,12 @@ - returns the bytes that caused the exception - uses ASCII-8BIT as the encoding +/home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/encoding/invalid_byte_sequence_error/incomplete_input_spec.rb +Encoding::InvalidByteSequenceError#incomplete_input? +- returns nil by default +- returns true if #primitive_convert returned :incomplete_input for the same data +- returns false if #primitive_convert returned :invalid_byte_sequence for the same data + /home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/encoding/invalid_byte_sequence_error/readagain_bytes_spec.rb Encoding::InvalidByteSequenceError#readagain_bytes - returns a String @@ -20915,10 +20974,27 @@ - returns self /home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/integer/chr_spec.rb -Integer#chr -- returns a string containing the ASCII character represented by self +Integer#chr without argument +- returns a String +- returns a new String for each call +- returns a US-ASCII String if self is between 0 and 127 (inclusive) +- returns an ASCII-8BIT String if self is between 128 and 255 (inclusive) +- interprets self as a codepoint in the corresponding character set +- raises a RangeError is self is greater than 255 +- raises a RangeError is self is less than 0 + +Integer#chr with an encoding argument +- returns a String - returns a new String for each call -- raises a RangeError if self is out of the ASCII character range +- accepts an Encoding object as an argument +- accepts a String as an argument +- converts a String to an Encoding as Encoding.find does +- returns characters in the specified encoding even if they exist in US-ASCII +- behaves as called with no argument if encoding is specified as US-ASCII and self is less than 128 +- behaves as called with no argument if encoding is specified as ASCII-8BIT and self is between 128 and 255 +- interprets self as a codepoint in the corresponding character set +- raises a RangeError if self is an invalid codepoint for the given encoding +- raises a RangeError is self is less than 0 /home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/integer/denominator_spec.rb Integer#denominator @@ -24915,21 +24991,22 @@ /home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/ascii_only_spec.rb String#ascii_only? -- needs to be reviewed for spec completeness -- returns true if the String contains only ASCII characters -- returns true if the String contains only ASCII characters - and is encoded as ASCII -- returns true if the String contains only ASCII characters +- returns true if the String contains only US-ASCII characters +- returns true if the String contains only US-ASCII characters + and is encoded as US-ASCII +- returns true if the String contains only US-ASCII characters and is encoded as UTF-8 -- returns false if the String contains only non-ASCII characters -- returns false if the String contains only non-ASCII characters +- returns true for all single-character US-ASCII Strings +- returns false for the first non-US-ASCII single-character String +- returns false if the String contains only non-US-ASCII characters +- returns false if the String contains only non-US-ASCII characters and is encoded as UTF-8 - returns false if the String contains only non-ASCII characters - and is encoded as ASCII -- returns false if the String contains ASCII and non-ASCII characters -- returns false if the String contains ASCII and non-ASCII characters - and is encoded as ASCII -- returns false if the String contains ASCII and non-ASCII characters + and is encoded as US-ASCII +- returns false if the String contains US-ASCII and non-US-ASCII characters +- returns false if the String contains US-ASCII and non-US-ASCII characters + and is encoded as US-ASCII +- returns false if the String contains US-ASCII and non-US-ASCII characters and is encoded as UTF-8 - accepts no arguments - returns true for the empty String @@ -25028,6 +25105,39 @@ - returns self if modifications were made - returns nil when called on an empty string +/home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/chr_spec.rb +String#chr +- returns a copy of self +- returns a String +- returns an empty String if self is an empty String +- returns a 1-character String +- returns the character at the start of the String +- returns a String in the same encoding as self +- understands multi-byte characters +- understands Strings that contain a mixture of character widths + +/home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/clear_spec.rb +String#clear +- sets self equal to the empty String +- returns self after emptying it +- preserves its encoding +- works with multibyte Strings +- raises a RuntimeError if self is frozen + +/home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/codepoints_spec.rb +String#codepoints +- returns an Enumerator when no block is given +- returns an Enumerator when no block is given even when self has an invalid encoding +- raises an ArgumentError when self has an invalid encoding and a method is called on the returned Enumerator +- yields each codepoint to the block if one is given +- raises an ArgumentError if self's encoding is invalid and a block is given +- returns codepoints as Fixnums +- returns one codepoint for each character +- works for multibyte characters +- returns the codepoint corresponding to the character's position in the String's encoding +- round-trips to the original String using Integer#chr +- is synonomous with #bytes for Strings which are single-byte optimisable + /home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/comparison_spec.rb String#<=> with String - compares individual characters based on their ascii value @@ -25131,6 +25241,20 @@ - returns a different character if the String is transcoded - uses the String's encoding to determine what characters it contains +/home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/each_codepoint_spec.rb +String#each_codepoint +- returns an Enumerator when no block is given +- returns an Enumerator when no block is given even when self has an invalid encoding +- raises an ArgumentError when self has an invalid encoding and a method is called on the returned Enumerator +- yields each codepoint to the block if one is given +- raises an ArgumentError if self's encoding is invalid and a block is given +- returns codepoints as Fixnums +- returns one codepoint for each character +- works for multibyte characters +- returns the codepoint corresponding to the character's position in the String's encoding +- round-trips to the original String using Integer#chr +- is synonomous with #bytes for Strings which are single-byte optimisable + /home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/each_line_spec.rb String#each_line - splits self using the supplied record separator and passes each substring to the block @@ -25227,6 +25351,40 @@ String#empty? - returns true if the string has a length of zero +/home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/encoding_spec.rb +String#encoding +- returns an Encoding object +- is equal to the source encoding by default +- returns the given encoding if #force_encoding has been called +- returns the given encoding if #encode!has been called + +String#encoding for US-ASCII Strings +- returns US-ASCII if self is US-ASCII +- returns US-ASCII if self is US-ASCII only, despite the default internal encoding being different +- returns US-ASCII if self is US-ASCII only, despite the default external encoding being different +- returns US-ASCII if self is US-ASCII only, despite the default internal and external encodings being different +- returns US-ASCII if self is US-ASCII only, despite the default encodings being different + +String#encoding for Strings with \u escapes +- returns UTF-8 +- returns US-ASCII if self is US-ASCII only +- returns UTF-8 if self isn't US-ASCII only +- is not affected by the default internal encoding +- is not affected by the default external encoding +- is not affected by both the default internal and external encoding being set at the same time +- returns the given encoding if #force_encoding has been called +- returns the given encoding if #encode!has been called + +String#encoding for Strings with \x escapes +- returns US-ASCII if self is US-ASCII only +- returns ASCII-8BIT when an escape creates a byte with the 8th bit set if the source encoding is US-ASCII +- returns the source encoding when an escape creates a byte with the 8th bit set if the source encoding isn't US-ASCII +- is not affected by the default internal encoding +- is not affected by the default external encoding +- is not affected by both the default internal and external encoding being set at the same time +- returns the given encoding if #force_encoding has been called +- returns the given encoding if #encode!has been called + /home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/end_with_spec.rb String#end_with? - returns true only if ends match @@ -25387,6 +25545,21 @@ String#length - returns the length of self +/home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/lines_spec.rb +String#lines +- splits self using the supplied record separator and passes each substring to the block +- taints substrings that are passed to the block if self is tainted +- passes self as a whole to the block if the separator is nil +- appends multiple successive newlines together when the separator is an empty string +- uses $/ as the separator when none is given +- yields subclass instances for subclasses +- returns self +- tries to convert the separator to a string using to_str +- not care if the string is modified while substituting +- raises a TypeError when the separator can't be converted to a string +- accept string-like separator +- returns an enumerator when no block given + /home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/ljust_spec.rb String#ljust with length, padding - returns a new string of specified length with self left justified and padded with padstr @@ -25950,6 +26123,21 @@ - requires that the sign if any appears before the base specifier - raises an ArgumentError for illegal bases (1, < 0 or > 36) +/home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/to_r_spec.rb +String#to_r +- returns a Rational object +- returns (0/1) for the empty String +- returns (n/1) for a String starting with a decimal _n_ +- ignores trailing characters +- ignores leading spaces +- does not ignore arbitrary, non-numeric leading characters +- treats leading hypens as minus signs +- does not treat a leading period without a numeric prefix as a decimal point +- understands decimal points +- ignores underscores between numbers +- understands a forward slash as separating the numerator from the denominator +- returns (0/1) for Strings it can't parse + /home/chkbuild/tmp/build/ruby-1.9.1//rubyspec/core/string/to_s_spec.rb String#to_s - returns self when self.class == String