diff options
| author | why <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-10 14:15:27 +0000 |
|---|---|---|
| committer | why <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-10 14:15:27 +0000 |
| commit | 79fac09d456e6b158b57aa6379e9410b2cc7b6db (patch) | |
| tree | 6931c25c8907d5e481be1281be1a30297a3fff53 /lib/yaml/constants.rb | |
| parent | 123d566fc9926ffb9b0e2ba84e9c84504fea5491 (diff) | |
| download | ruby-79fac09d456e6b158b57aa6379e9410b2cc7b6db.tar.gz ruby-79fac09d456e6b158b57aa6379e9410b2cc7b6db.tar.xz ruby-79fac09d456e6b158b57aa6379e9410b2cc7b6db.zip | |
* ext/syck/token.c: preserve newlines prepended to a block.
* ext/syck/implicit.c (syck_match_implicit): added !merge and !default.
* lib/yaml/constants.rb: remove '\z' escape.
* lib/yaml/emitter.rb: ensure reset of @seq_map shortcut flag.
* lib/yaml/encoding.rb: remove Unicode translation methods.
* lib/yaml/rubytypes.rb: improved round-tripping of Strings.
[ruby-core:1134]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/yaml/constants.rb')
| -rw-r--r-- | lib/yaml/constants.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/yaml/constants.rb b/lib/yaml/constants.rb index 21aee7e0a..fb833d307 100644 --- a/lib/yaml/constants.rb +++ b/lib/yaml/constants.rb @@ -15,19 +15,19 @@ module YAML WORD_CHAR = 'A-Za-z0-9' PRINTABLE_CHAR = '-_A-Za-z0-9!?/()$\'". ' NOT_PLAIN_CHAR = '\x7f\x0-\x1f\x80-\x9f' - ESCAPE_CHAR = '[\\x00-\\x08\\x0b-\\x0d\\x0e-\\x1f]' + ESCAPE_CHAR = '[\\x00-\\x09\\x0b-\\x1f]' INDICATOR_CHAR = '*&!|\\\\^@%{}[]=' SPACE_INDICATORS = '-#:,?' RESTRICTED_INDICATORS = '#:,}]' DNS_COMP_RE = "\\w(?:[-\\w]*\\w)?" DNS_NAME_RE = "(?:(?:#{DNS_COMP_RE}\\.)+#{DNS_COMP_RE}|#{DNS_COMP_RE})" - ESCAPES = %w{\z \x01 \x02 \x03 \x04 \x05 \x06 \a + ESCAPES = %w{\x00 \x01 \x02 \x03 \x04 \x05 \x06 \a \x08 \t \n \v \f \r \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1a \e \x1c \x1d \x1e \x1f } UNESCAPES = { - 'z' => "\x00", 'a' => "\x07", 'b' => "\x08", 't' => "\x09", + 'a' => "\x07", 'b' => "\x08", 't' => "\x09", 'n' => "\x0a", 'v' => "\x0b", 'f' => "\x0c", 'r' => "\x0d", 'e' => "\x1b", '\\' => '\\', } @@ -41,11 +41,5 @@ module YAML :WidthType => 'absolute', :BestWidth => 80, :UseBlock => false, :UseFold => false, :Encoding => :None } - TRANSFER_DOMAINS = { - 'yaml.org,2002' => {}, - 'ruby.yaml.org,2002' => {} - } - PRIVATE_TYPES = {} - IMPLICIT_TYPES = [ 'null', 'bool', 'time', 'int', 'float' ] end |
