Skip to content
Permalink
Browse files

Merge pull request #791 from kostya/encoding

enable encoding feature
  • Loading branch information
alex committed Jul 9, 2013
2 parents 5542899 + 40b6400 commit d8203a6efeed4015e171417f75aacd4c356f32b6
Showing with 811 additions and 5 deletions.
  1. +2 −0 spec/tags/core/bignum/to_s_tags.txt
  2. +2 −0 spec/tags/core/dir/element_reference_tags.txt
  3. +3 −0 spec/tags/core/dir/getwd_tags.txt
  4. +2 −0 spec/tags/core/dir/glob_tags.txt
  5. +1 −0 spec/tags/core/dir/path_tags.txt
  6. +3 −0 spec/tags/core/dir/pwd_tags.txt
  7. +8 −0 spec/tags/core/encoding/aliases_tags.txt
  8. +2 −0 spec/tags/core/encoding/ascii_compatible_tags.txt
  9. +47 −0 spec/tags/core/encoding/compatible_tags.txt
  10. +6 −0 spec/tags/core/encoding/converter/asciicompat_encoding_tags.txt
  11. +26 −0 spec/tags/core/encoding/converter/constants_tags.txt
  12. +7 −0 spec/tags/core/encoding/converter/convert_tags.txt
  13. +7 −0 spec/tags/core/encoding/converter/convpath_tags.txt
  14. +1 −0 spec/tags/core/encoding/converter/destination_encoding_tags.txt
  15. +6 −0 spec/tags/core/encoding/converter/finish_tags.txt
  16. +10 −0 spec/tags/core/encoding/converter/last_error_tags.txt
  17. +19 −0 spec/tags/core/encoding/converter/new_tags.txt
  18. +23 −0 spec/tags/core/encoding/converter/primitive_convert_tags.txt
  19. +10 −0 spec/tags/core/encoding/converter/primitive_errinfo_tags.txt
  20. +6 −0 spec/tags/core/encoding/converter/putback_tags.txt
  21. +8 −0 spec/tags/core/encoding/converter/replacement_tags.txt
  22. +8 −0 spec/tags/core/encoding/converter/search_convpath_tags.txt
  23. +1 −0 spec/tags/core/encoding/converter/source_encoding_tags.txt
  24. +9 −0 spec/tags/core/encoding/default_external_tags.txt
  25. +13 −0 spec/tags/core/encoding/default_internal_tags.txt
  26. +2 −0 spec/tags/core/encoding/dummy_tags.txt
  27. +12 −0 spec/tags/core/encoding/find_tags.txt
  28. +3 −0 spec/tags/core/encoding/inspect_tags.txt
  29. +2 −0 spec/tags/core/encoding/invalid_byte_sequence_error/destination_encoding_name_tags.txt
  30. +2 −0 spec/tags/core/encoding/invalid_byte_sequence_error/destination_encoding_tags.txt
  31. +3 −0 spec/tags/core/encoding/invalid_byte_sequence_error/error_bytes_tags.txt
  32. +3 −0 spec/tags/core/encoding/invalid_byte_sequence_error/incomplete_input_tags.txt
  33. +3 −0 spec/tags/core/encoding/invalid_byte_sequence_error/readagain_bytes_tags.txt
  34. +3 −0 spec/tags/core/encoding/invalid_byte_sequence_error/source_encoding_name_tags.txt
  35. +3 −0 spec/tags/core/encoding/invalid_byte_sequence_error/source_encoding_tags.txt
  36. +7 −0 spec/tags/core/encoding/list_tags.txt
  37. +3 −0 spec/tags/core/encoding/locale_charmap_tags.txt
  38. +3 −0 spec/tags/core/encoding/name_list_tags.txt
  39. +2 −0 spec/tags/core/encoding/name_tags.txt
  40. +4 −0 spec/tags/core/encoding/names_tags.txt
  41. +4 −0 spec/tags/core/encoding/replicate_tags.txt
  42. +2 −0 spec/tags/core/encoding/to_s_tags.txt
  43. +2 −0 spec/tags/core/encoding/undefined_conversion_error/destination_encoding_name_tags.txt
  44. +2 −0 spec/tags/core/encoding/undefined_conversion_error/destination_encoding_tags.txt
  45. +3 −0 spec/tags/core/encoding/undefined_conversion_error/error_char_tags.txt
  46. +3 −0 spec/tags/core/encoding/undefined_conversion_error/source_encoding_name_tags.txt
  47. +3 −0 spec/tags/core/encoding/undefined_conversion_error/source_encoding_tags.txt
  48. +2 −0 spec/tags/core/env/each_pair_tags.txt
  49. +2 −0 spec/tags/core/env/each_tags.txt
  50. +2 −0 spec/tags/core/env/element_reference_tags.txt
  51. +2 −0 spec/tags/core/env/shift_tags.txt
  52. +1 −0 spec/tags/core/file/expand_path_tags.txt
  53. +1 −0 spec/tags/core/file/extname_tags.txt
  54. +2 −0 spec/tags/core/fixnum/to_s_tags.txt
  55. +2 −0 spec/tags/core/float/to_s_tags.txt
  56. +1 −0 spec/tags/core/io/binwrite_tags.txt
  57. +59 −0 spec/tags/core/io/external_encoding_tags.txt
  58. +67 −0 spec/tags/core/io/internal_encoding_tags.txt
  59. +40 −0 spec/tags/core/io/read_tags.txt
  60. +14 −0 spec/tags/core/io/set_encoding_tags.txt
  61. +2 −0 spec/tags/core/kernel/chomp_tags.txt
  62. +2 −0 spec/tags/core/kernel/chop_tags.txt
  63. +1 −0 spec/tags/core/kernel/sprintf_tags.txt
  64. +2 −0 spec/tags/core/matchdata/post_match_tags.txt
  65. +2 −0 spec/tags/core/matchdata/pre_match_tags.txt
  66. +10 −0 spec/tags/core/string/ascii_only_tags.txt
  67. +1 −0 spec/tags/core/string/bytes_tags.txt
  68. +4 −0 spec/tags/core/string/bytesize_tags.txt
  69. +1 −0 spec/tags/core/string/byteslice_tags.txt
  70. +3 −0 spec/tags/core/string/center_tags.txt
  71. +5 −0 spec/tags/core/string/chars_tags.txt
  72. +2 −0 spec/tags/core/string/chomp_tags.txt
  73. +4 −0 spec/tags/core/string/chop_tags.txt
  74. +8 −0 spec/tags/core/string/chr_tags.txt
  75. +1 −0 spec/tags/core/string/clear_tags.txt
  76. +11 −0 spec/tags/core/string/codepoints_tags.txt
  77. +1 −0 spec/tags/core/string/downcase_tags.txt
  78. +5 −0 spec/tags/core/string/each_char_tags.txt
  79. +11 −0 spec/tags/core/string/each_codepoint_tags.txt
  80. +37 −0 spec/tags/core/string/element_set_tags.txt
  81. +85 −0 spec/tags/core/string/encode_tags.txt
  82. +25 −0 spec/tags/core/string/encoding_tags.txt
  83. +8 −0 spec/tags/core/string/force_encoding_tags.txt
  84. +7 −0 spec/tags/core/string/index_tags.txt
  85. +1 −0 spec/tags/core/string/insert_tags.txt
  86. +4 −0 spec/tags/core/string/inspect_tags.txt
  87. +3 −0 spec/tags/core/string/ljust_tags.txt
  88. +1 −0 spec/tags/core/string/multiply_tags.txt
  89. +2 −0 spec/tags/core/string/ord_tags.txt
  90. +3 −0 spec/tags/core/string/rindex_tags.txt
  91. +3 −0 spec/tags/core/string/rjust_tags.txt
  92. +5 −0 spec/tags/core/string/slice_tags.txt
  93. +5 −0 spec/tags/core/string/tr_s_tags.txt
  94. +3 −0 spec/tags/core/string/tr_tags.txt
  95. +6 −0 spec/tags/core/string/valid_encoding_tags.txt
  96. +1 −0 spec/tags/core/time/_load_tags.txt
  97. +3 −0 spec/tags/language/string_tags.txt
  98. +1 −0 topaz.mspec
  99. +24 −0 topaz/objects/encodingobject.py
  100. +1 −1 topaz/objects/fileobject.py
  101. +1 −3 topaz/objects/ioobject.py
  102. +7 −1 topaz/utils/filemode.py
@@ -1 +1,3 @@
fails:Bignum#to_s when given a base returns self converted to a String using the given base
fails:Bignum#to_s returns a String in US-ASCII encoding when Encoding.default_internal is nil
fails:Bignum#to_s returns a String in US-ASCII encoding when Encoding.default_internal is not nil
@@ -0,0 +1,2 @@
fails:Dir.[] raises an Encoding::CompatibilityError if the argument encoding is not compatible with US-ASCII
fails:Dir.[] returns Strings in the encoding of the pattern
@@ -0,0 +1,3 @@
fails:Dir.getwd returns the current working directory
fails:Dir.getwd returns a String with Encoding.default_external encoding
fails:Dir.getwd does not transcode to Encoding.default_internal
@@ -0,0 +1,2 @@
fails:Dir.glob raises an Encoding::CompatibilityError if the argument encoding is not compatible with US-ASCII
fails:Dir.glob with encoding returns Strings in the encoding of the pattern
@@ -1,2 +1,3 @@
fails:Dir#path returns the path that was supplied to .new or .open
fails:Dir#path returns the path even when called on a closed Dir instance
fails:Dir#path returns a String with the same encoding as the argument to .open
@@ -1 +1,4 @@
fails:Dir.pwd correctly displays dirs with unicode characters in them
fails:Dir.pwd returns the current working directory
fails:Dir.pwd returns a String with Encoding.default_external encoding
fails:Dir.pwd does not transcode to Encoding.default_internal
@@ -0,0 +1,8 @@
fails:Encoding.aliases returns a Hash
fails:Encoding.aliases has Strings as keys
fails:Encoding.aliases has Strings as values
fails:Encoding.aliases has alias names as its keys
fails:Encoding.aliases has the names of the aliased encoding as its values
fails:Encoding.aliases has an 'external' key with the external default encoding as its value
fails:Encoding.aliases has a 'locale' key and its value equals to the name of the encoding finded by the locale charmap
fails:Encoding.aliases only contains valid aliased encodings
@@ -0,0 +1,2 @@
fails:Encoding#ascii_compatible? returns true if self represents an ASCII-compatible encoding
fails:Encoding#ascii_compatible? returns false if self does not represent an ASCII-compatible encoding
@@ -0,0 +1,47 @@
fails:Encoding.compatible? String, String when the first's Encoding is valid US-ASCII returns US-ASCII when the second's is US-ASCII
fails:Encoding.compatible? String, String when the first's Encoding is valid US-ASCII returns US-ASCII if the second String is ASCII-8BIT and ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is valid US-ASCII returns ASCII-8BIT if the second String is ASCII-8BIT but not ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is valid US-ASCII returns US-ASCII if the second String is UTF-8 and ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is valid US-ASCII returns UTF-8 if the second String is UTF-8 but not ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is ASCII compatible and ASCII only returns the first's Encoding if the second is ASCII compatible and ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is ASCII compatible and ASCII only returns the second's Encoding if the second is ASCII compatible but not ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is ASCII compatible and ASCII only returns nil if the second's Encoding is not ASCII compatible
fails:Encoding.compatible? String, String when the first's Encoding is ASCII compatible but not ASCII only returns the first's Encoding if the second's is valid US-ASCII
fails:Encoding.compatible? String, String when the first's Encoding is ASCII compatible but not ASCII only returns the first's Encoding if the second's is UTF-8 and ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is ASCII compatible but not ASCII only returns nil if the second encoding is ASCII compatible but neither String's encoding is ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is not ASCII compatible returns nil when the second String is US-ASCII
fails:Encoding.compatible? String, String when the first's Encoding is not ASCII compatible returns nil when the second String is ASCII-8BIT and ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is not ASCII compatible returns nil when the second String is ASCII-8BIT but not ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is not ASCII compatible returns the Encoding when the second's Encoding is not ASCII compatible but the same as the first's Encoding
fails:Encoding.compatible? String, String when the first's Encoding is invalid returns the first's Encoding when the second's Encoding is US-ASCII
fails:Encoding.compatible? String, String when the first's Encoding is invalid returns the first's Encoding when the second String is ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is invalid returns nil when the second's Encoding is ASCII-8BIT but not ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is invalid returns nil when the second's Encoding is invalid and ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is invalid returns nil when the second's Encoding is invalid and not ASCII only
fails:Encoding.compatible? String, String when the first's Encoding is invalid returns the Encoding when the second's Encoding is invalid but the same as the first
fails:Encoding.compatible? String, Regexp returns US-ASCII if both are US-ASCII
fails:Encoding.compatible? String, Regexp returns the String's Encoding if it is not US-ASCII but both are ASCII only
fails:Encoding.compatible? String, Regexp returns the String's Encoding if the String is not ASCII only
fails:Encoding.compatible? String, Symbol returns US-ASCII if both are ASCII only
fails:Encoding.compatible? String, Symbol returns the String's Encoding if it is not US-ASCII but both are ASCII only
fails:Encoding.compatible? String, Symbol returns the String's Encoding if the String is not ASCII only
fails:Encoding.compatible? Regexp, String returns US-ASCII if both are US-ASCII
fails:Encoding.compatible? Regexp, Regexp returns US-ASCII if both are US-ASCII
fails:Encoding.compatible? Regexp, Regexp returns the first's Encoding if it is not US-ASCII and not ASCII only
fails:Encoding.compatible? Regexp, Symbol returns US-ASCII if both are US-ASCII
fails:Encoding.compatible? Regexp, Symbol returns the first's Encoding if it is not US-ASCII and not ASCII only
fails:Encoding.compatible? Symbol, String returns US-ASCII if both are ASCII only
fails:Encoding.compatible? Symbol, Regexp returns US-ASCII if both are US-ASCII
fails:Encoding.compatible? Symbol, Regexp returns the Regexp's Encoding if it is not US-ASCII and not ASCII only
fails:Encoding.compatible? Symbol, Symbol returns US-ASCII if both are US-ASCII
fails:Encoding.compatible? Symbol, Symbol returns the first's Encoding if it is not ASCII only
fails:Encoding.compatible? Encoding, Encoding returns nil if one of the encodings is a dummy encoding
fails:Encoding.compatible? Encoding, Encoding returns nil if one of the encodings is not US-ASCII
fails:Encoding.compatible? Encoding, Encoding returns the first if the second is US-ASCII
fails:Encoding.compatible? Encoding, Encoding returns the Encoding if both are the same
fails:Encoding.compatible? Object, Object returns nil for Object, String
fails:Encoding.compatible? Object, Object returns nil for Object, Regexp
fails:Encoding.compatible? Object, Object returns nil for Object, Symbol
fails:Encoding.compatible? Object, Object returns nil for String, Object
fails:Encoding.compatible? Object, Object returns nil for Regexp, Object
fails:Encoding.compatible? Object, Object returns nil for Symbol, Object
@@ -0,0 +1,6 @@
fails:Encoding::Converter.asciicompat_encoding accepts an encoding name as a String argument
fails:Encoding::Converter.asciicompat_encoding coerces non-String/Encoding objects with #to_str
fails:Encoding::Converter.asciicompat_encoding accepts an Encoding object as an argument
fails:Encoding::Converter.asciicompat_encoding returns a corresponding ASCII compatible encoding for ASCII-incompatible encodings
fails:Encoding::Converter.asciicompat_encoding returns nil when the given encoding is ASCII compatible
fails:Encoding::Converter.asciicompat_encoding handles encoding names who resolve to nil encodings
@@ -0,0 +1,26 @@
fails:Encoding::Converter::INVALID_MASK exists
fails:Encoding::Converter::INVALID_MASK has a Fixnum value
fails:Encoding::Converter::INVALID_REPLACE exists
fails:Encoding::Converter::INVALID_REPLACE has a Fixnum value
fails:Encoding::Converter::UNDEF_MASK exists
fails:Encoding::Converter::UNDEF_MASK has a Fixnum value
fails:Encoding::Converter::UNDEF_REPLACE exists
fails:Encoding::Converter::UNDEF_REPLACE has a Fixnum value
fails:Encoding::Converter::UNDEF_HEX_CHARREF exists
fails:Encoding::Converter::UNDEF_HEX_CHARREF has a Fixnum value
fails:Encoding::Converter::PARTIAL_INPUT exists
fails:Encoding::Converter::PARTIAL_INPUT has a Fixnum value
fails:Encoding::Converter::AFTER_OUTPUT exists
fails:Encoding::Converter::AFTER_OUTPUT has a Fixnum value
fails:Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR exists
fails:Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR has a Fixnum value
fails:Encoding::Converter::CRLF_NEWLINE_DECORATOR exists
fails:Encoding::Converter::CRLF_NEWLINE_DECORATOR has a Fixnum value
fails:Encoding::Converter::CR_NEWLINE_DECORATOR exists
fails:Encoding::Converter::CR_NEWLINE_DECORATOR has a Fixnum value
fails:Encoding::Converter::XML_TEXT_DECORATOR exists
fails:Encoding::Converter::XML_TEXT_DECORATOR has a Fixnum value
fails:Encoding::Converter::XML_ATTR_CONTENT_DECORATOR exists
fails:Encoding::Converter::XML_ATTR_CONTENT_DECORATOR has a Fixnum value
fails:Encoding::Converter::XML_ATTR_QUOTE_DECORATOR exists
fails:Encoding::Converter::XML_ATTR_QUOTE_DECORATOR has a Fixnum value
@@ -0,0 +1,7 @@
fails:Encoding::Converter#convert returns a String
fails:Encoding::Converter#convert sets the encoding of the result to the target encoding
fails:Encoding::Converter#convert transcodes the given String to the target encoding
fails:Encoding::Converter#convert allows Strings of different encodings to the source encoding
fails:Encoding::Converter#convert reuses the given encoding pair if called multiple times
fails:Encoding::Converter#convert raises UndefinedConversionError if the String contains characters invalid for the target encoding
fails:Encoding::Converter#convert raises an ArgumentError if called on a finished stream
@@ -0,0 +1,7 @@
fails:Encoding::Converter#convpath returns an Array
fails:Encoding::Converter#convpath returns each encoding pair as a sub-Array
fails:Encoding::Converter#convpath returns each encoding as an Encoding object
fails:Encoding::Converter#convpath returns multiple encoding pairs when direct conversion is impossible
fails:Encoding::Converter#convpath sets the last element of each pair to the first element of the next
fails:Encoding::Converter#convpath only lists a source encoding once
fails:Encoding::Converter#convpath indicates if crlf_newline conversion would occur
@@ -0,0 +1 @@
fails:Encoding::Converter#destination_encoding returns the destination encoding as an Encoding object
@@ -0,0 +1,6 @@
fails:Encoding::Converter#finish returns a String
fails:Encoding::Converter#finish returns an empty String if there is nothing more to convert
fails:Encoding::Converter#finish returns the last part of the converted String if it hasn't already
fails:Encoding::Converter#finish returns a String in the destination encoding
fails:Encoding::Converter#finish returns an empty String if self was not given anything to convert
fails:Encoding::Converter#finish returns an empty String on subsequent invocations
@@ -0,0 +1,10 @@
fails:Encoding::Converter#last_error returns nil when the no conversion has been attempted
fails:Encoding::Converter#last_error returns nil when the last conversion did not produce an error
fails:Encoding::Converter#last_error returns nil when #primitive_convert last returned :destination_buffer_full
fails:Encoding::Converter#last_error returns nil when #primitive_convert last returned :finished
fails:Encoding::Converter#last_error returns nil if the last conversion succeeded but the penultimate failed
fails:Encoding::Converter#last_error returns an Encoding::InvalidByteSequenceError when #primitive_convert last returned :invalid_byte_sequence
fails:Encoding::Converter#last_error returns an Encoding::UndefinedConversionError when #primitive_convert last returned :undefined_conversion
fails:Encoding::Converter#last_error returns an Encoding::InvalidByteSequenceError when #primitive_convert last returned :incomplete_input
fails:Encoding::Converter#last_error returns an Encoding::InvalidByteSequenceError when the last call to #convert produced one
fails:Encoding::Converter#last_error returns an Encoding::UndefinedConversionError when the last call to #convert produced one
@@ -0,0 +1,19 @@
fails:Encoding::Converter.new accepts a String for the source encoding
fails:Encoding::Converter.new accepts a String for the destination encoding
fails:Encoding::Converter.new accepts an Encoding object for the source encoding
fails:Encoding::Converter.new accepts an Encoding object for the destination encoding
fails:Encoding::Converter.new raises an Encoding::ConverterNotFoundError if both encodings are the same
fails:Encoding::Converter.new calls #to_str to convert the source encoding argument to an encoding name
fails:Encoding::Converter.new calls #to_str to convert the destination encoding argument to an encoding name
fails:Encoding::Converter.new sets replacement from the options Hash
fails:Encoding::Converter.new calls #to_hash to convert the options argument to a Hash if not a Fixnum
fails:Encoding::Converter.new calls #to_str to convert the replacement object to a String
fails:Encoding::Converter.new raises a TypeError if #to_str does not return a String
fails:Encoding::Converter.new raises a TypeError if passed true for the replacement object
fails:Encoding::Converter.new raises a TypeError if passed false for the replacement object
fails:Encoding::Converter.new raises a TypeError if passed a Fixnum for the replacement object
fails:Encoding::Converter.new accepts an empty String for the replacement object
fails:Encoding::Converter.new when passed nil for the replacement object when the destination encoding is not UTF-8 sets the replacement String to '?'
fails:Encoding::Converter.new when passed nil for the replacement object when the destination encoding is not UTF-8 sets the replacement String encoding to US-ASCII
fails:Encoding::Converter.new when passed nil for the replacement object when the destination encoding is not UTF-8 sets the replacement String to '\uFFFD'
fails:Encoding::Converter.new when passed nil for the replacement object when the destination encoding is not UTF-8 sets the replacement String encoding to UTF-8
@@ -0,0 +1,23 @@
fails:Encoding::Converter#primitive_convert accepts a nil source buffer
fails:Encoding::Converter#primitive_convert accepts a String as the source buffer
fails:Encoding::Converter#primitive_convert accepts nil for the destination byte offset
fails:Encoding::Converter#primitive_convert accepts an integer for the destination byte offset
fails:Encoding::Converter#primitive_convert calls #to_int to convert the destination byte offset
fails:Encoding::Converter#primitive_convert raises an ArgumentError if the destination byte offset is greater than the bytesize of the destination buffer
fails:Encoding::Converter#primitive_convert uses the destination byte offset to determine where to write the result in the destination buffer
fails:Encoding::Converter#primitive_convert accepts nil for the destination bytesize
fails:Encoding::Converter#primitive_convert accepts an integer for the destination bytesize
fails:Encoding::Converter#primitive_convert allows a destination bytesize value greater than the bytesize of the source buffer
fails:Encoding::Converter#primitive_convert allows a destination bytesize value less than the bytesize of the source buffer
fails:Encoding::Converter#primitive_convert calls #to_int to convert the destination byte size
fails:Encoding::Converter#primitive_convert uses destination bytesize as the maximumn bytesize of the destination buffer
fails:Encoding::Converter#primitive_convert allows a destination buffer of unlimited size if destination bytesize is nil
fails:Encoding::Converter#primitive_convert accepts an options hash
fails:Encoding::Converter#primitive_convert sets the destination buffer's encoding to the destination encoding if the conversion suceeded
fails:Encoding::Converter#primitive_convert sets the destination buffer's encoding to the destination encoding if the conversion failed
fails:Encoding::Converter#primitive_convert returns :incomplete_input when source buffer ends unexpectedly and :partial_input isn't specified
fails:Encoding::Converter#primitive_convert returns :source_buffer_empty when source buffer ends unexpectedly and :partial_input is true
fails:Encoding::Converter#primitive_convert returns :undefined_conversion when a character in the source buffer is not representable in the output encoding
fails:Encoding::Converter#primitive_convert returns :invalid_byte_sequence when an invalid byte sequence was found in the source buffer
fails:Encoding::Converter#primitive_convert returns :finished when the conversion succeeded
fails:Encoding::Converter#primitive_convert returns :destination_buffer_full when the destination buffer is too small
@@ -0,0 +1,10 @@
fails:Encoding::Converter#primitive_errinfo returns [:source_buffer_empty,nil,nil,nil,nil] when no conversion has been attempted
fails:Encoding::Converter#primitive_errinfo returns [:finished,nil,nil,nil,nil] when #primitive_convert last returned :finished
fails:Encoding::Converter#primitive_errinfo returns [:source_buffer_empty,nil,nil,nil, nil] when #convert last succeeded
fails:Encoding::Converter#primitive_errinfo returns [:destination_buffer_full,nil,nil,nil,nil] when #primitive_convert last returned :destination_buffer_full
fails:Encoding::Converter#primitive_errinfo returns the status of the last primitive conversion, even if it was successful and the previous one wasn't
fails:Encoding::Converter#primitive_errinfo returns the state, source encoding, target encoding, and the erroneous bytes when #primitive_convert last returned :undefined_conversion
fails:Encoding::Converter#primitive_errinfo returns the state, source encoding, target encoding, and erroneous bytes when #primitive_convert last returned :incomplete_input
fails:Encoding::Converter#primitive_errinfo returns the state, source encoding, target encoding, erroneous bytes, and the read-again bytes when #primitive_convert last returned :invalid_byte_sequence
fails:Encoding::Converter#primitive_errinfo returns the state, source encoding, target encoding, erroneous bytes, and the read-again bytes when #convert last raised InvalidByteSequenceError
fails:Encoding::Converter#primitive_errinfo returns the state, source encoding, target encoding, erroneous bytes, and the read-again bytes when #finish last raised InvalidByteSequenceError
@@ -0,0 +1,6 @@
fails:Encoding::Converter#putback returns a String
fails:Encoding::Converter#putback returns a String in the source encoding
fails:Encoding::Converter#putback returns the bytes buffered due to an :invalid_byte_sequence error
fails:Encoding::Converter#putback allows conversion to be resumed after an :invalid_byte_sequence
fails:Encoding::Converter#putback returns an empty String when there are no more bytes to put back
fails:Encoding::Converter#putback accepts an integer argument corresponding to the number of bytes to be put back

0 comments on commit d8203a6

Please sign in to comment.
You can’t perform that action at this time.