mail 2.7.1 → 2.8.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +45 -28
  3. data/lib/mail/attachments_list.rb +2 -5
  4. data/lib/mail/body.rb +24 -47
  5. data/lib/mail/check_delivery_params.rb +21 -16
  6. data/lib/mail/constants.rb +27 -5
  7. data/lib/mail/elements/address.rb +27 -27
  8. data/lib/mail/elements/address_list.rb +1 -1
  9. data/lib/mail/elements/content_disposition_element.rb +1 -1
  10. data/lib/mail/elements/content_location_element.rb +1 -1
  11. data/lib/mail/elements/content_transfer_encoding_element.rb +1 -1
  12. data/lib/mail/elements/content_type_element.rb +8 -4
  13. data/lib/mail/elements/date_time_element.rb +1 -1
  14. data/lib/mail/elements/envelope_from_element.rb +13 -7
  15. data/lib/mail/elements/message_ids_element.rb +14 -5
  16. data/lib/mail/elements/mime_version_element.rb +1 -1
  17. data/lib/mail/elements/phrase_list.rb +7 -2
  18. data/lib/mail/elements/received_element.rb +20 -6
  19. data/lib/mail/encodings/7bit.rb +5 -0
  20. data/lib/mail/encodings/base64.rb +2 -2
  21. data/lib/mail/encodings/quoted_printable.rb +2 -2
  22. data/lib/mail/encodings.rb +30 -59
  23. data/lib/mail/envelope.rb +11 -14
  24. data/lib/mail/field.rb +37 -53
  25. data/lib/mail/field_list.rb +60 -7
  26. data/lib/mail/fields/bcc_field.rb +34 -52
  27. data/lib/mail/fields/cc_field.rb +28 -49
  28. data/lib/mail/fields/comments_field.rb +27 -37
  29. data/lib/mail/fields/common_address_field.rb +170 -0
  30. data/lib/mail/fields/common_date_field.rb +58 -0
  31. data/lib/mail/fields/common_field.rb +77 -0
  32. data/lib/mail/fields/common_message_id_field.rb +42 -0
  33. data/lib/mail/fields/content_description_field.rb +7 -14
  34. data/lib/mail/fields/content_disposition_field.rb +13 -38
  35. data/lib/mail/fields/content_id_field.rb +24 -51
  36. data/lib/mail/fields/content_location_field.rb +11 -25
  37. data/lib/mail/fields/content_transfer_encoding_field.rb +31 -31
  38. data/lib/mail/fields/content_type_field.rb +46 -71
  39. data/lib/mail/fields/date_field.rb +23 -51
  40. data/lib/mail/fields/from_field.rb +28 -49
  41. data/lib/mail/fields/in_reply_to_field.rb +38 -49
  42. data/lib/mail/fields/keywords_field.rb +18 -31
  43. data/lib/mail/fields/message_id_field.rb +25 -71
  44. data/lib/mail/fields/mime_version_field.rb +19 -30
  45. data/lib/mail/fields/named_structured_field.rb +11 -0
  46. data/lib/mail/fields/named_unstructured_field.rb +11 -0
  47. data/lib/mail/fields/optional_field.rb +5 -6
  48. data/lib/mail/fields/{common/parameter_hash.rb → parameter_hash.rb} +12 -10
  49. data/lib/mail/fields/received_field.rb +43 -57
  50. data/lib/mail/fields/references_field.rb +35 -49
  51. data/lib/mail/fields/reply_to_field.rb +28 -49
  52. data/lib/mail/fields/resent_bcc_field.rb +28 -49
  53. data/lib/mail/fields/resent_cc_field.rb +28 -49
  54. data/lib/mail/fields/resent_date_field.rb +5 -29
  55. data/lib/mail/fields/resent_from_field.rb +28 -49
  56. data/lib/mail/fields/resent_message_id_field.rb +5 -29
  57. data/lib/mail/fields/resent_sender_field.rb +27 -56
  58. data/lib/mail/fields/resent_to_field.rb +28 -49
  59. data/lib/mail/fields/return_path_field.rb +50 -54
  60. data/lib/mail/fields/sender_field.rb +34 -55
  61. data/lib/mail/fields/structured_field.rb +3 -30
  62. data/lib/mail/fields/subject_field.rb +9 -11
  63. data/lib/mail/fields/to_field.rb +28 -49
  64. data/lib/mail/fields/unstructured_field.rb +16 -48
  65. data/lib/mail/header.rb +69 -110
  66. data/lib/mail/matchers/attachment_matchers.rb +15 -0
  67. data/lib/mail/message.rb +52 -66
  68. data/lib/mail/multibyte/chars.rb +8 -166
  69. data/lib/mail/multibyte/utils.rb +26 -43
  70. data/lib/mail/multibyte.rb +1 -11
  71. data/lib/mail/network/delivery_methods/exim.rb +5 -4
  72. data/lib/mail/network/delivery_methods/file_delivery.rb +11 -10
  73. data/lib/mail/network/delivery_methods/logger_delivery.rb +2 -5
  74. data/lib/mail/network/delivery_methods/sendmail.rb +27 -35
  75. data/lib/mail/network/delivery_methods/smtp.rb +25 -9
  76. data/lib/mail/network/delivery_methods/smtp_connection.rb +3 -12
  77. data/lib/mail/network/delivery_methods/test_mailer.rb +4 -2
  78. data/lib/mail/network/retriever_methods/base.rb +8 -8
  79. data/lib/mail/network/retriever_methods/imap.rb +2 -2
  80. data/lib/mail/network/retriever_methods/pop3.rb +2 -2
  81. data/lib/mail/network/retriever_methods/test_retriever.rb +2 -1
  82. data/lib/mail/parsers/address_lists_parser.rb +33070 -33064
  83. data/lib/mail/parsers/address_lists_parser.rl +7 -0
  84. data/lib/mail/parsers/content_disposition_parser.rb +833 -827
  85. data/lib/mail/parsers/content_disposition_parser.rl +7 -0
  86. data/lib/mail/parsers/content_location_parser.rb +770 -764
  87. data/lib/mail/parsers/content_location_parser.rl +7 -0
  88. data/lib/mail/parsers/content_transfer_encoding_parser.rb +474 -468
  89. data/lib/mail/parsers/content_transfer_encoding_parser.rl +7 -0
  90. data/lib/mail/parsers/content_type_parser.rb +971 -965
  91. data/lib/mail/parsers/content_type_parser.rl +7 -0
  92. data/lib/mail/parsers/date_time_parser.rb +838 -832
  93. data/lib/mail/parsers/date_time_parser.rl +7 -0
  94. data/lib/mail/parsers/envelope_from_parser.rb +3623 -3529
  95. data/lib/mail/parsers/envelope_from_parser.rl +7 -0
  96. data/lib/mail/parsers/message_ids_parser.rb +5107 -2800
  97. data/lib/mail/parsers/message_ids_parser.rl +12 -1
  98. data/lib/mail/parsers/mime_version_parser.rb +463 -457
  99. data/lib/mail/parsers/mime_version_parser.rl +7 -0
  100. data/lib/mail/parsers/phrase_lists_parser.rb +836 -830
  101. data/lib/mail/parsers/phrase_lists_parser.rl +8 -1
  102. data/lib/mail/parsers/received_parser.rb +8688 -8682
  103. data/lib/mail/parsers/received_parser.rl +7 -0
  104. data/lib/mail/parsers/rfc5322.rl +28 -13
  105. data/lib/mail/parsers.rb +11 -17
  106. data/lib/mail/part.rb +5 -9
  107. data/lib/mail/parts_list.rb +57 -0
  108. data/lib/mail/smtp_envelope.rb +57 -0
  109. data/lib/mail/utilities.rb +307 -69
  110. data/lib/mail/version.rb +3 -3
  111. data/lib/mail/yaml.rb +30 -0
  112. data/lib/mail.rb +3 -20
  113. metadata +72 -18
  114. data/lib/mail/core_extensions/smtp.rb +0 -28
  115. data/lib/mail/core_extensions/string.rb +0 -17
  116. data/lib/mail/fields/common/address_container.rb +0 -17
  117. data/lib/mail/fields/common/common_address.rb +0 -161
  118. data/lib/mail/fields/common/common_date.rb +0 -36
  119. data/lib/mail/fields/common/common_field.rb +0 -52
  120. data/lib/mail/fields/common/common_message_id.rb +0 -49
  121. data/lib/mail/version_specific/ruby_1_8.rb +0 -163
  122. data/lib/mail/version_specific/ruby_1_9.rb +0 -278
@@ -3,514 +3,520 @@
3
3
  require "mail/utilities"
4
4
  require "mail/parser_tools"
5
5
 
6
- module Mail::Parsers
7
- module ContentTransferEncodingParser
8
- extend Mail::ParserTools
6
+ begin
7
+ original_verbose, $VERBOSE = $VERBOSE, nil
9
8
 
10
- ContentTransferEncodingStruct = Struct.new(:encoding, :error)
9
+ module Mail::Parsers
10
+ module ContentTransferEncodingParser
11
+ extend Mail::ParserTools
11
12
 
12
- class << self
13
- attr_accessor :_trans_keys
14
- private :_trans_keys, :_trans_keys=
15
- end
16
- self._trans_keys = [
17
- 0, 0, 9, 126, 10, 10,
18
- 9, 32, 10, 10, 9,
19
- 32, 10, 10, 9, 32,
20
- 9, 126, 1, 244, 1, 244,
21
- 10, 10, 9, 32, 0,
22
- 244, 128, 191, 160, 191,
23
- 128, 191, 128, 159, 144, 191,
24
- 128, 191, 128, 143, 9,
25
- 126, 9, 59, 9, 59,
26
- 9, 40, 9, 40, 0, 0,
27
- 0,
28
- ]
13
+ ContentTransferEncodingStruct = Struct.new(:encoding, :error)
29
14
 
30
- class << self
31
- attr_accessor :_key_spans
32
- private :_key_spans, :_key_spans=
33
- end
34
- self._key_spans = [
35
- 0, 118, 1, 24, 1, 24, 1, 24,
36
- 118, 244, 244, 1, 24, 245, 64, 32,
37
- 64, 32, 48, 64, 16, 118, 51, 51,
38
- 32, 32, 0,
39
- ]
15
+ class << self
16
+ attr_accessor :_trans_keys
17
+ private :_trans_keys, :_trans_keys=
18
+ end
19
+ self._trans_keys = [
20
+ 0, 0, 9, 126, 10, 10,
21
+ 9, 32, 10, 10, 9,
22
+ 32, 10, 10, 9, 32,
23
+ 9, 126, 1, 244, 1, 244,
24
+ 10, 10, 9, 32, 0,
25
+ 244, 128, 191, 160, 191,
26
+ 128, 191, 128, 159, 144, 191,
27
+ 128, 191, 128, 143, 9,
28
+ 126, 9, 59, 9, 59,
29
+ 9, 40, 9, 40, 0, 0,
30
+ 0,
31
+ ]
40
32
 
41
- class << self
42
- attr_accessor :_index_offsets
43
- private :_index_offsets, :_index_offsets=
44
- end
45
- self._index_offsets = [
46
- 0, 0, 119, 121, 146, 148, 173, 175,
47
- 200, 319, 564, 809, 811, 836, 1082, 1147,
48
- 1180, 1245, 1278, 1327, 1392, 1409, 1528, 1580,
49
- 1632, 1665, 1698,
50
- ]
33
+ class << self
34
+ attr_accessor :_key_spans
35
+ private :_key_spans, :_key_spans=
36
+ end
37
+ self._key_spans = [
38
+ 0, 118, 1, 24, 1, 24, 1, 24,
39
+ 118, 244, 244, 1, 24, 245, 64, 32,
40
+ 64, 32, 48, 64, 16, 118, 51, 51,
41
+ 32, 32, 0,
42
+ ]
51
43
 
52
- class << self
53
- attr_accessor :_indicies
54
- private :_indicies, :_indicies=
55
- end
56
- self._indicies = [
57
- 0, 1, 1, 1, 2, 1, 1, 1,
58
- 1, 1, 1, 1, 1, 1, 1, 1,
59
- 1, 1, 1, 1, 1, 1, 1, 0,
60
- 3, 3, 3, 3, 3, 3, 3, 4,
61
- 1, 3, 3, 3, 3, 3, 1, 3,
62
- 3, 3, 3, 3, 3, 3, 3, 3,
63
- 3, 1, 1, 1, 1, 1, 1, 1,
64
- 3, 3, 3, 3, 3, 3, 3, 3,
65
- 3, 3, 3, 3, 3, 3, 3, 3,
66
- 3, 3, 3, 3, 3, 3, 3, 3,
67
- 3, 3, 1, 1, 1, 3, 3, 3,
68
- 3, 3, 3, 3, 3, 3, 3, 3,
69
- 3, 3, 3, 3, 3, 3, 3, 3,
70
- 3, 3, 3, 3, 3, 3, 3, 3,
71
- 3, 3, 3, 3, 3, 3, 1, 5,
72
- 1, 0, 1, 1, 1, 1, 1, 1,
73
- 1, 1, 1, 1, 1, 1, 1, 1,
74
- 1, 1, 1, 1, 1, 1, 1, 1,
75
- 0, 1, 6, 1, 7, 1, 1, 1,
76
- 1, 1, 1, 1, 1, 1, 1, 1,
77
- 1, 1, 1, 1, 1, 1, 1, 1,
78
- 1, 1, 1, 7, 1, 8, 1, 9,
79
- 1, 1, 1, 1, 1, 1, 1, 1,
80
- 1, 1, 1, 1, 1, 1, 1, 1,
81
- 1, 1, 1, 1, 1, 1, 9, 1,
82
- 10, 1, 1, 1, 11, 1, 1, 1,
83
- 1, 1, 1, 1, 1, 1, 1, 1,
84
- 1, 1, 1, 1, 1, 1, 1, 10,
85
- 12, 12, 12, 12, 12, 12, 12, 13,
86
- 1, 12, 12, 12, 12, 12, 1, 12,
87
- 12, 12, 12, 12, 12, 12, 12, 12,
88
- 12, 1, 1, 1, 1, 1, 1, 1,
89
- 12, 12, 12, 12, 12, 12, 12, 12,
90
- 12, 12, 12, 12, 12, 12, 12, 12,
91
- 12, 12, 12, 12, 12, 12, 12, 12,
92
- 12, 12, 1, 1, 1, 12, 12, 12,
93
- 12, 12, 12, 12, 12, 12, 12, 12,
94
- 12, 12, 12, 12, 12, 12, 12, 12,
95
- 12, 12, 12, 12, 12, 12, 12, 12,
96
- 12, 12, 12, 12, 12, 12, 1, 14,
97
- 14, 14, 14, 14, 14, 14, 14, 14,
98
- 1, 14, 14, 15, 14, 14, 14, 14,
99
- 14, 14, 14, 14, 14, 14, 14, 14,
100
- 14, 14, 14, 14, 14, 14, 14, 14,
101
- 14, 14, 14, 14, 14, 14, 16, 17,
102
- 14, 14, 14, 14, 14, 14, 14, 14,
103
- 14, 14, 14, 14, 14, 14, 14, 14,
104
- 14, 14, 14, 14, 14, 14, 14, 14,
105
- 14, 14, 14, 14, 14, 14, 14, 14,
106
- 14, 14, 14, 14, 14, 14, 14, 14,
107
- 14, 14, 14, 14, 14, 14, 14, 14,
108
- 14, 14, 18, 14, 14, 14, 14, 14,
109
- 14, 14, 14, 14, 14, 14, 14, 14,
110
- 14, 14, 14, 14, 14, 14, 14, 14,
111
- 14, 14, 14, 14, 14, 14, 14, 14,
112
- 14, 14, 14, 14, 14, 14, 1, 1,
113
- 1, 1, 1, 1, 1, 1, 1, 1,
114
- 1, 1, 1, 1, 1, 1, 1, 1,
115
- 1, 1, 1, 1, 1, 1, 1, 1,
116
- 1, 1, 1, 1, 1, 1, 1, 1,
117
- 1, 1, 1, 1, 1, 1, 1, 1,
118
- 1, 1, 1, 1, 1, 1, 1, 1,
119
- 1, 1, 1, 1, 1, 1, 1, 1,
120
- 1, 1, 1, 1, 1, 1, 1, 1,
121
- 19, 19, 19, 19, 19, 19, 19, 19,
122
- 19, 19, 19, 19, 19, 19, 19, 19,
123
- 19, 19, 19, 19, 19, 19, 19, 19,
124
- 19, 19, 19, 19, 19, 19, 20, 21,
125
- 21, 21, 21, 21, 21, 21, 21, 21,
126
- 21, 21, 21, 22, 21, 21, 23, 24,
127
- 24, 24, 25, 1, 26, 26, 26, 26,
128
- 26, 26, 26, 26, 26, 1, 26, 26,
129
- 27, 26, 26, 26, 26, 26, 26, 26,
130
- 26, 26, 26, 26, 26, 26, 26, 26,
131
- 26, 26, 26, 26, 26, 26, 26, 26,
132
- 26, 26, 26, 28, 29, 26, 26, 26,
133
- 26, 26, 26, 26, 26, 26, 26, 26,
134
- 26, 26, 26, 26, 26, 26, 26, 26,
135
- 26, 26, 26, 26, 26, 26, 26, 26,
136
- 26, 26, 26, 26, 26, 26, 26, 26,
137
- 26, 26, 26, 26, 26, 26, 26, 26,
138
- 26, 26, 26, 26, 26, 26, 26, 30,
139
- 26, 26, 26, 26, 26, 26, 26, 26,
140
- 26, 26, 26, 26, 26, 26, 26, 26,
141
- 26, 26, 26, 26, 26, 26, 26, 26,
142
- 26, 26, 26, 26, 26, 26, 26, 26,
143
- 26, 26, 26, 1, 1, 1, 1, 1,
144
- 1, 1, 1, 1, 1, 1, 1, 1,
145
- 1, 1, 1, 1, 1, 1, 1, 1,
146
- 1, 1, 1, 1, 1, 1, 1, 1,
147
- 1, 1, 1, 1, 1, 1, 1, 1,
148
- 1, 1, 1, 1, 1, 1, 1, 1,
149
- 1, 1, 1, 1, 1, 1, 1, 1,
150
- 1, 1, 1, 1, 1, 1, 1, 1,
151
- 1, 1, 1, 1, 1, 31, 31, 31,
152
- 31, 31, 31, 31, 31, 31, 31, 31,
153
- 31, 31, 31, 31, 31, 31, 31, 31,
154
- 31, 31, 31, 31, 31, 31, 31, 31,
155
- 31, 31, 31, 32, 33, 33, 33, 33,
156
- 33, 33, 33, 33, 33, 33, 33, 33,
157
- 34, 33, 33, 35, 36, 36, 36, 37,
158
- 1, 38, 1, 26, 1, 1, 1, 1,
159
- 1, 1, 1, 1, 1, 1, 1, 1,
160
- 1, 1, 1, 1, 1, 1, 1, 1,
161
- 1, 1, 26, 1, 26, 26, 26, 26,
162
- 26, 26, 26, 26, 26, 26, 26, 26,
163
- 26, 26, 26, 26, 26, 26, 26, 26,
164
- 26, 26, 26, 26, 26, 26, 26, 26,
165
- 26, 26, 26, 26, 26, 26, 26, 26,
166
- 26, 26, 26, 26, 26, 26, 26, 26,
167
- 26, 26, 26, 26, 26, 26, 26, 26,
168
- 26, 26, 26, 26, 26, 26, 26, 26,
169
- 26, 26, 26, 26, 26, 26, 26, 26,
170
- 26, 26, 26, 26, 26, 26, 26, 26,
171
- 26, 26, 26, 26, 26, 26, 26, 26,
172
- 26, 26, 26, 26, 26, 26, 26, 26,
173
- 26, 26, 26, 26, 26, 26, 26, 26,
174
- 26, 26, 26, 26, 26, 26, 26, 26,
175
- 26, 26, 26, 26, 26, 26, 26, 26,
176
- 26, 26, 26, 26, 26, 26, 26, 26,
177
- 26, 26, 26, 26, 1, 1, 1, 1,
178
- 1, 1, 1, 1, 1, 1, 1, 1,
179
- 1, 1, 1, 1, 1, 1, 1, 1,
180
- 1, 1, 1, 1, 1, 1, 1, 1,
181
- 1, 1, 1, 1, 1, 1, 1, 1,
182
- 1, 1, 1, 1, 1, 1, 1, 1,
183
- 1, 1, 1, 1, 1, 1, 1, 1,
184
- 1, 1, 1, 1, 1, 1, 1, 1,
185
- 1, 1, 1, 1, 1, 1, 31, 31,
186
- 31, 31, 31, 31, 31, 31, 31, 31,
187
- 31, 31, 31, 31, 31, 31, 31, 31,
188
- 31, 31, 31, 31, 31, 31, 31, 31,
189
- 31, 31, 31, 31, 32, 33, 33, 33,
190
- 33, 33, 33, 33, 33, 33, 33, 33,
191
- 33, 34, 33, 33, 35, 36, 36, 36,
192
- 37, 1, 26, 26, 26, 26, 26, 26,
193
- 26, 26, 26, 26, 26, 26, 26, 26,
194
- 26, 26, 26, 26, 26, 26, 26, 26,
195
- 26, 26, 26, 26, 26, 26, 26, 26,
196
- 26, 26, 26, 26, 26, 26, 26, 26,
197
- 26, 26, 26, 26, 26, 26, 26, 26,
198
- 26, 26, 26, 26, 26, 26, 26, 26,
199
- 26, 26, 26, 26, 26, 26, 26, 26,
200
- 26, 26, 1, 31, 31, 31, 31, 31,
201
- 31, 31, 31, 31, 31, 31, 31, 31,
202
- 31, 31, 31, 31, 31, 31, 31, 31,
203
- 31, 31, 31, 31, 31, 31, 31, 31,
204
- 31, 31, 31, 1, 31, 31, 31, 31,
205
- 31, 31, 31, 31, 31, 31, 31, 31,
206
- 31, 31, 31, 31, 31, 31, 31, 31,
207
- 31, 31, 31, 31, 31, 31, 31, 31,
208
- 31, 31, 31, 31, 31, 31, 31, 31,
209
- 31, 31, 31, 31, 31, 31, 31, 31,
210
- 31, 31, 31, 31, 31, 31, 31, 31,
211
- 31, 31, 31, 31, 31, 31, 31, 31,
212
- 31, 31, 31, 31, 1, 31, 31, 31,
213
- 31, 31, 31, 31, 31, 31, 31, 31,
214
- 31, 31, 31, 31, 31, 31, 31, 31,
215
- 31, 31, 31, 31, 31, 31, 31, 31,
216
- 31, 31, 31, 31, 31, 1, 33, 33,
217
- 33, 33, 33, 33, 33, 33, 33, 33,
218
- 33, 33, 33, 33, 33, 33, 33, 33,
219
- 33, 33, 33, 33, 33, 33, 33, 33,
220
- 33, 33, 33, 33, 33, 33, 33, 33,
221
- 33, 33, 33, 33, 33, 33, 33, 33,
222
- 33, 33, 33, 33, 33, 33, 1, 33,
223
- 33, 33, 33, 33, 33, 33, 33, 33,
224
- 33, 33, 33, 33, 33, 33, 33, 33,
225
- 33, 33, 33, 33, 33, 33, 33, 33,
226
- 33, 33, 33, 33, 33, 33, 33, 33,
227
- 33, 33, 33, 33, 33, 33, 33, 33,
228
- 33, 33, 33, 33, 33, 33, 33, 33,
229
- 33, 33, 33, 33, 33, 33, 33, 33,
230
- 33, 33, 33, 33, 33, 33, 33, 1,
231
- 33, 33, 33, 33, 33, 33, 33, 33,
232
- 33, 33, 33, 33, 33, 33, 33, 33,
233
- 1, 39, 1, 1, 1, 40, 1, 1,
234
- 1, 1, 1, 1, 1, 1, 1, 1,
235
- 1, 1, 1, 1, 1, 1, 1, 1,
236
- 39, 41, 41, 41, 41, 41, 41, 41,
237
- 42, 1, 41, 41, 41, 41, 41, 1,
238
- 41, 41, 41, 41, 41, 41, 41, 41,
239
- 41, 41, 1, 43, 1, 1, 1, 1,
240
- 1, 41, 41, 41, 41, 41, 41, 41,
241
- 41, 41, 41, 41, 41, 41, 41, 41,
242
- 41, 41, 41, 41, 41, 41, 41, 41,
243
- 41, 41, 41, 1, 1, 1, 41, 41,
244
- 41, 41, 41, 41, 41, 41, 41, 41,
245
- 41, 41, 41, 41, 41, 41, 41, 41,
246
- 41, 41, 41, 41, 41, 41, 41, 41,
247
- 41, 41, 41, 41, 41, 41, 41, 1,
248
- 7, 1, 1, 1, 44, 1, 1, 1,
249
- 1, 1, 1, 1, 1, 1, 1, 1,
250
- 1, 1, 1, 1, 1, 1, 1, 7,
251
- 1, 1, 1, 1, 1, 1, 1, 45,
252
- 1, 1, 1, 1, 1, 1, 1, 1,
253
- 1, 1, 1, 1, 1, 1, 1, 1,
254
- 1, 1, 9, 1, 46, 1, 1, 1,
255
- 47, 1, 1, 1, 1, 1, 1, 1,
256
- 1, 1, 1, 1, 1, 1, 1, 1,
257
- 1, 1, 1, 46, 1, 1, 1, 1,
258
- 1, 1, 1, 48, 1, 1, 1, 1,
259
- 1, 1, 1, 1, 1, 1, 1, 1,
260
- 1, 1, 1, 1, 1, 1, 49, 1,
261
- 9, 1, 1, 1, 50, 1, 1, 1,
262
- 1, 1, 1, 1, 1, 1, 1, 1,
263
- 1, 1, 1, 1, 1, 1, 1, 9,
264
- 1, 1, 1, 1, 1, 1, 1, 51,
265
- 1, 49, 1, 1, 1, 52, 1, 1,
266
- 1, 1, 1, 1, 1, 1, 1, 1,
267
- 1, 1, 1, 1, 1, 1, 1, 1,
268
- 49, 1, 1, 1, 1, 1, 1, 1,
269
- 53, 1, 1, 0,
270
- ]
44
+ class << self
45
+ attr_accessor :_index_offsets
46
+ private :_index_offsets, :_index_offsets=
47
+ end
48
+ self._index_offsets = [
49
+ 0, 0, 119, 121, 146, 148, 173, 175,
50
+ 200, 319, 564, 809, 811, 836, 1082, 1147,
51
+ 1180, 1245, 1278, 1327, 1392, 1409, 1528, 1580,
52
+ 1632, 1665, 1698,
53
+ ]
271
54
 
272
- class << self
273
- attr_accessor :_trans_targs
274
- private :_trans_targs, :_trans_targs=
275
- end
276
- self._trans_targs = [
277
- 1, 0, 2, 21, 8, 3, 5, 22,
278
- 7, 24, 1, 2, 21, 8, 10, 11,
279
- 10, 26, 13, 14, 15, 16, 17, 18,
280
- 19, 20, 10, 11, 10, 26, 13, 14,
281
- 15, 16, 17, 18, 19, 20, 12, 22,
282
- 4, 21, 23, 24, 4, 23, 22, 4,
283
- 23, 24, 6, 25, 6, 25,
284
- ]
55
+ class << self
56
+ attr_accessor :_indicies
57
+ private :_indicies, :_indicies=
58
+ end
59
+ self._indicies = [
60
+ 0, 1, 1, 1, 2, 1, 1, 1,
61
+ 1, 1, 1, 1, 1, 1, 1, 1,
62
+ 1, 1, 1, 1, 1, 1, 1, 0,
63
+ 3, 3, 3, 3, 3, 3, 3, 4,
64
+ 1, 3, 3, 3, 3, 3, 1, 3,
65
+ 3, 3, 3, 3, 3, 3, 3, 3,
66
+ 3, 1, 1, 1, 1, 1, 1, 1,
67
+ 3, 3, 3, 3, 3, 3, 3, 3,
68
+ 3, 3, 3, 3, 3, 3, 3, 3,
69
+ 3, 3, 3, 3, 3, 3, 3, 3,
70
+ 3, 3, 1, 1, 1, 3, 3, 3,
71
+ 3, 3, 3, 3, 3, 3, 3, 3,
72
+ 3, 3, 3, 3, 3, 3, 3, 3,
73
+ 3, 3, 3, 3, 3, 3, 3, 3,
74
+ 3, 3, 3, 3, 3, 3, 1, 5,
75
+ 1, 0, 1, 1, 1, 1, 1, 1,
76
+ 1, 1, 1, 1, 1, 1, 1, 1,
77
+ 1, 1, 1, 1, 1, 1, 1, 1,
78
+ 0, 1, 6, 1, 7, 1, 1, 1,
79
+ 1, 1, 1, 1, 1, 1, 1, 1,
80
+ 1, 1, 1, 1, 1, 1, 1, 1,
81
+ 1, 1, 1, 7, 1, 8, 1, 9,
82
+ 1, 1, 1, 1, 1, 1, 1, 1,
83
+ 1, 1, 1, 1, 1, 1, 1, 1,
84
+ 1, 1, 1, 1, 1, 1, 9, 1,
85
+ 10, 1, 1, 1, 11, 1, 1, 1,
86
+ 1, 1, 1, 1, 1, 1, 1, 1,
87
+ 1, 1, 1, 1, 1, 1, 1, 10,
88
+ 12, 12, 12, 12, 12, 12, 12, 13,
89
+ 1, 12, 12, 12, 12, 12, 1, 12,
90
+ 12, 12, 12, 12, 12, 12, 12, 12,
91
+ 12, 1, 1, 1, 1, 1, 1, 1,
92
+ 12, 12, 12, 12, 12, 12, 12, 12,
93
+ 12, 12, 12, 12, 12, 12, 12, 12,
94
+ 12, 12, 12, 12, 12, 12, 12, 12,
95
+ 12, 12, 1, 1, 1, 12, 12, 12,
96
+ 12, 12, 12, 12, 12, 12, 12, 12,
97
+ 12, 12, 12, 12, 12, 12, 12, 12,
98
+ 12, 12, 12, 12, 12, 12, 12, 12,
99
+ 12, 12, 12, 12, 12, 12, 1, 14,
100
+ 14, 14, 14, 14, 14, 14, 14, 14,
101
+ 1, 14, 14, 15, 14, 14, 14, 14,
102
+ 14, 14, 14, 14, 14, 14, 14, 14,
103
+ 14, 14, 14, 14, 14, 14, 14, 14,
104
+ 14, 14, 14, 14, 14, 14, 16, 17,
105
+ 14, 14, 14, 14, 14, 14, 14, 14,
106
+ 14, 14, 14, 14, 14, 14, 14, 14,
107
+ 14, 14, 14, 14, 14, 14, 14, 14,
108
+ 14, 14, 14, 14, 14, 14, 14, 14,
109
+ 14, 14, 14, 14, 14, 14, 14, 14,
110
+ 14, 14, 14, 14, 14, 14, 14, 14,
111
+ 14, 14, 18, 14, 14, 14, 14, 14,
112
+ 14, 14, 14, 14, 14, 14, 14, 14,
113
+ 14, 14, 14, 14, 14, 14, 14, 14,
114
+ 14, 14, 14, 14, 14, 14, 14, 14,
115
+ 14, 14, 14, 14, 14, 14, 1, 1,
116
+ 1, 1, 1, 1, 1, 1, 1, 1,
117
+ 1, 1, 1, 1, 1, 1, 1, 1,
118
+ 1, 1, 1, 1, 1, 1, 1, 1,
119
+ 1, 1, 1, 1, 1, 1, 1, 1,
120
+ 1, 1, 1, 1, 1, 1, 1, 1,
121
+ 1, 1, 1, 1, 1, 1, 1, 1,
122
+ 1, 1, 1, 1, 1, 1, 1, 1,
123
+ 1, 1, 1, 1, 1, 1, 1, 1,
124
+ 19, 19, 19, 19, 19, 19, 19, 19,
125
+ 19, 19, 19, 19, 19, 19, 19, 19,
126
+ 19, 19, 19, 19, 19, 19, 19, 19,
127
+ 19, 19, 19, 19, 19, 19, 20, 21,
128
+ 21, 21, 21, 21, 21, 21, 21, 21,
129
+ 21, 21, 21, 22, 21, 21, 23, 24,
130
+ 24, 24, 25, 1, 26, 26, 26, 26,
131
+ 26, 26, 26, 26, 26, 1, 26, 26,
132
+ 27, 26, 26, 26, 26, 26, 26, 26,
133
+ 26, 26, 26, 26, 26, 26, 26, 26,
134
+ 26, 26, 26, 26, 26, 26, 26, 26,
135
+ 26, 26, 26, 28, 29, 26, 26, 26,
136
+ 26, 26, 26, 26, 26, 26, 26, 26,
137
+ 26, 26, 26, 26, 26, 26, 26, 26,
138
+ 26, 26, 26, 26, 26, 26, 26, 26,
139
+ 26, 26, 26, 26, 26, 26, 26, 26,
140
+ 26, 26, 26, 26, 26, 26, 26, 26,
141
+ 26, 26, 26, 26, 26, 26, 26, 30,
142
+ 26, 26, 26, 26, 26, 26, 26, 26,
143
+ 26, 26, 26, 26, 26, 26, 26, 26,
144
+ 26, 26, 26, 26, 26, 26, 26, 26,
145
+ 26, 26, 26, 26, 26, 26, 26, 26,
146
+ 26, 26, 26, 1, 1, 1, 1, 1,
147
+ 1, 1, 1, 1, 1, 1, 1, 1,
148
+ 1, 1, 1, 1, 1, 1, 1, 1,
149
+ 1, 1, 1, 1, 1, 1, 1, 1,
150
+ 1, 1, 1, 1, 1, 1, 1, 1,
151
+ 1, 1, 1, 1, 1, 1, 1, 1,
152
+ 1, 1, 1, 1, 1, 1, 1, 1,
153
+ 1, 1, 1, 1, 1, 1, 1, 1,
154
+ 1, 1, 1, 1, 1, 31, 31, 31,
155
+ 31, 31, 31, 31, 31, 31, 31, 31,
156
+ 31, 31, 31, 31, 31, 31, 31, 31,
157
+ 31, 31, 31, 31, 31, 31, 31, 31,
158
+ 31, 31, 31, 32, 33, 33, 33, 33,
159
+ 33, 33, 33, 33, 33, 33, 33, 33,
160
+ 34, 33, 33, 35, 36, 36, 36, 37,
161
+ 1, 38, 1, 26, 1, 1, 1, 1,
162
+ 1, 1, 1, 1, 1, 1, 1, 1,
163
+ 1, 1, 1, 1, 1, 1, 1, 1,
164
+ 1, 1, 26, 1, 26, 26, 26, 26,
165
+ 26, 26, 26, 26, 26, 26, 26, 26,
166
+ 26, 26, 26, 26, 26, 26, 26, 26,
167
+ 26, 26, 26, 26, 26, 26, 26, 26,
168
+ 26, 26, 26, 26, 26, 26, 26, 26,
169
+ 26, 26, 26, 26, 26, 26, 26, 26,
170
+ 26, 26, 26, 26, 26, 26, 26, 26,
171
+ 26, 26, 26, 26, 26, 26, 26, 26,
172
+ 26, 26, 26, 26, 26, 26, 26, 26,
173
+ 26, 26, 26, 26, 26, 26, 26, 26,
174
+ 26, 26, 26, 26, 26, 26, 26, 26,
175
+ 26, 26, 26, 26, 26, 26, 26, 26,
176
+ 26, 26, 26, 26, 26, 26, 26, 26,
177
+ 26, 26, 26, 26, 26, 26, 26, 26,
178
+ 26, 26, 26, 26, 26, 26, 26, 26,
179
+ 26, 26, 26, 26, 26, 26, 26, 26,
180
+ 26, 26, 26, 26, 1, 1, 1, 1,
181
+ 1, 1, 1, 1, 1, 1, 1, 1,
182
+ 1, 1, 1, 1, 1, 1, 1, 1,
183
+ 1, 1, 1, 1, 1, 1, 1, 1,
184
+ 1, 1, 1, 1, 1, 1, 1, 1,
185
+ 1, 1, 1, 1, 1, 1, 1, 1,
186
+ 1, 1, 1, 1, 1, 1, 1, 1,
187
+ 1, 1, 1, 1, 1, 1, 1, 1,
188
+ 1, 1, 1, 1, 1, 1, 31, 31,
189
+ 31, 31, 31, 31, 31, 31, 31, 31,
190
+ 31, 31, 31, 31, 31, 31, 31, 31,
191
+ 31, 31, 31, 31, 31, 31, 31, 31,
192
+ 31, 31, 31, 31, 32, 33, 33, 33,
193
+ 33, 33, 33, 33, 33, 33, 33, 33,
194
+ 33, 34, 33, 33, 35, 36, 36, 36,
195
+ 37, 1, 26, 26, 26, 26, 26, 26,
196
+ 26, 26, 26, 26, 26, 26, 26, 26,
197
+ 26, 26, 26, 26, 26, 26, 26, 26,
198
+ 26, 26, 26, 26, 26, 26, 26, 26,
199
+ 26, 26, 26, 26, 26, 26, 26, 26,
200
+ 26, 26, 26, 26, 26, 26, 26, 26,
201
+ 26, 26, 26, 26, 26, 26, 26, 26,
202
+ 26, 26, 26, 26, 26, 26, 26, 26,
203
+ 26, 26, 1, 31, 31, 31, 31, 31,
204
+ 31, 31, 31, 31, 31, 31, 31, 31,
205
+ 31, 31, 31, 31, 31, 31, 31, 31,
206
+ 31, 31, 31, 31, 31, 31, 31, 31,
207
+ 31, 31, 31, 1, 31, 31, 31, 31,
208
+ 31, 31, 31, 31, 31, 31, 31, 31,
209
+ 31, 31, 31, 31, 31, 31, 31, 31,
210
+ 31, 31, 31, 31, 31, 31, 31, 31,
211
+ 31, 31, 31, 31, 31, 31, 31, 31,
212
+ 31, 31, 31, 31, 31, 31, 31, 31,
213
+ 31, 31, 31, 31, 31, 31, 31, 31,
214
+ 31, 31, 31, 31, 31, 31, 31, 31,
215
+ 31, 31, 31, 31, 1, 31, 31, 31,
216
+ 31, 31, 31, 31, 31, 31, 31, 31,
217
+ 31, 31, 31, 31, 31, 31, 31, 31,
218
+ 31, 31, 31, 31, 31, 31, 31, 31,
219
+ 31, 31, 31, 31, 31, 1, 33, 33,
220
+ 33, 33, 33, 33, 33, 33, 33, 33,
221
+ 33, 33, 33, 33, 33, 33, 33, 33,
222
+ 33, 33, 33, 33, 33, 33, 33, 33,
223
+ 33, 33, 33, 33, 33, 33, 33, 33,
224
+ 33, 33, 33, 33, 33, 33, 33, 33,
225
+ 33, 33, 33, 33, 33, 33, 1, 33,
226
+ 33, 33, 33, 33, 33, 33, 33, 33,
227
+ 33, 33, 33, 33, 33, 33, 33, 33,
228
+ 33, 33, 33, 33, 33, 33, 33, 33,
229
+ 33, 33, 33, 33, 33, 33, 33, 33,
230
+ 33, 33, 33, 33, 33, 33, 33, 33,
231
+ 33, 33, 33, 33, 33, 33, 33, 33,
232
+ 33, 33, 33, 33, 33, 33, 33, 33,
233
+ 33, 33, 33, 33, 33, 33, 33, 1,
234
+ 33, 33, 33, 33, 33, 33, 33, 33,
235
+ 33, 33, 33, 33, 33, 33, 33, 33,
236
+ 1, 39, 1, 1, 1, 40, 1, 1,
237
+ 1, 1, 1, 1, 1, 1, 1, 1,
238
+ 1, 1, 1, 1, 1, 1, 1, 1,
239
+ 39, 41, 41, 41, 41, 41, 41, 41,
240
+ 42, 1, 41, 41, 41, 41, 41, 1,
241
+ 41, 41, 41, 41, 41, 41, 41, 41,
242
+ 41, 41, 1, 43, 1, 1, 1, 1,
243
+ 1, 41, 41, 41, 41, 41, 41, 41,
244
+ 41, 41, 41, 41, 41, 41, 41, 41,
245
+ 41, 41, 41, 41, 41, 41, 41, 41,
246
+ 41, 41, 41, 1, 1, 1, 41, 41,
247
+ 41, 41, 41, 41, 41, 41, 41, 41,
248
+ 41, 41, 41, 41, 41, 41, 41, 41,
249
+ 41, 41, 41, 41, 41, 41, 41, 41,
250
+ 41, 41, 41, 41, 41, 41, 41, 1,
251
+ 7, 1, 1, 1, 44, 1, 1, 1,
252
+ 1, 1, 1, 1, 1, 1, 1, 1,
253
+ 1, 1, 1, 1, 1, 1, 1, 7,
254
+ 1, 1, 1, 1, 1, 1, 1, 45,
255
+ 1, 1, 1, 1, 1, 1, 1, 1,
256
+ 1, 1, 1, 1, 1, 1, 1, 1,
257
+ 1, 1, 9, 1, 46, 1, 1, 1,
258
+ 47, 1, 1, 1, 1, 1, 1, 1,
259
+ 1, 1, 1, 1, 1, 1, 1, 1,
260
+ 1, 1, 1, 46, 1, 1, 1, 1,
261
+ 1, 1, 1, 48, 1, 1, 1, 1,
262
+ 1, 1, 1, 1, 1, 1, 1, 1,
263
+ 1, 1, 1, 1, 1, 1, 49, 1,
264
+ 9, 1, 1, 1, 50, 1, 1, 1,
265
+ 1, 1, 1, 1, 1, 1, 1, 1,
266
+ 1, 1, 1, 1, 1, 1, 1, 9,
267
+ 1, 1, 1, 1, 1, 1, 1, 51,
268
+ 1, 49, 1, 1, 1, 52, 1, 1,
269
+ 1, 1, 1, 1, 1, 1, 1, 1,
270
+ 1, 1, 1, 1, 1, 1, 1, 1,
271
+ 49, 1, 1, 1, 1, 1, 1, 1,
272
+ 53, 1, 1, 0,
273
+ ]
285
274
 
286
- class << self
287
- attr_accessor :_trans_actions
288
- private :_trans_actions, :_trans_actions=
289
- end
290
- self._trans_actions = [
291
- 0, 0, 0, 1, 2, 0, 0, 0,
292
- 0, 0, 3, 3, 4, 5, 6, 6,
293
- 7, 8, 6, 6, 6, 6, 6, 6,
294
- 6, 6, 0, 0, 2, 9, 0, 0,
295
- 0, 0, 0, 0, 0, 0, 0, 10,
296
- 10, 0, 11, 10, 0, 2, 3, 3,
297
- 5, 3, 0, 2, 3, 5,
298
- ]
275
+ class << self
276
+ attr_accessor :_trans_targs
277
+ private :_trans_targs, :_trans_targs=
278
+ end
279
+ self._trans_targs = [
280
+ 1, 0, 2, 21, 8, 3, 5, 22,
281
+ 7, 24, 1, 2, 21, 8, 10, 11,
282
+ 10, 26, 13, 14, 15, 16, 17, 18,
283
+ 19, 20, 10, 11, 10, 26, 13, 14,
284
+ 15, 16, 17, 18, 19, 20, 12, 22,
285
+ 4, 21, 23, 24, 4, 23, 22, 4,
286
+ 23, 24, 6, 25, 6, 25,
287
+ ]
299
288
 
300
- class << self
301
- attr_accessor :_eof_actions
302
- private :_eof_actions, :_eof_actions=
303
- end
304
- self._eof_actions = [
305
- 0, 0, 0, 0, 0, 0, 0, 0,
306
- 0, 0, 0, 0, 0, 0, 0, 0,
307
- 0, 0, 0, 0, 0, 10, 0, 3,
308
- 0, 3, 0,
309
- ]
289
+ class << self
290
+ attr_accessor :_trans_actions
291
+ private :_trans_actions, :_trans_actions=
292
+ end
293
+ self._trans_actions = [
294
+ 0, 0, 0, 1, 2, 0, 0, 0,
295
+ 0, 0, 3, 3, 4, 5, 6, 6,
296
+ 7, 8, 6, 6, 6, 6, 6, 6,
297
+ 6, 6, 0, 0, 2, 9, 0, 0,
298
+ 0, 0, 0, 0, 0, 0, 0, 10,
299
+ 10, 0, 11, 10, 0, 2, 3, 3,
300
+ 5, 3, 0, 2, 3, 5,
301
+ ]
310
302
 
311
- class << self
312
- attr_accessor :start
313
- end
314
- self.start = 1
315
- class << self
316
- attr_accessor :first_final
317
- end
318
- self.first_final = 21
319
- class << self
320
- attr_accessor :error
321
- end
322
- self.error = 0
303
+ class << self
304
+ attr_accessor :_eof_actions
305
+ private :_eof_actions, :_eof_actions=
306
+ end
307
+ self._eof_actions = [
308
+ 0, 0, 0, 0, 0, 0, 0, 0,
309
+ 0, 0, 0, 0, 0, 0, 0, 0,
310
+ 0, 0, 0, 0, 0, 10, 0, 3,
311
+ 0, 3, 0,
312
+ ]
323
313
 
324
- class << self
325
- attr_accessor :en_comment_tail
326
- end
327
- self.en_comment_tail = 9
328
- class << self
329
- attr_accessor :en_main
330
- end
331
- self.en_main = 1
314
+ class << self
315
+ attr_accessor :start
316
+ end
317
+ self.start = 1
318
+ class << self
319
+ attr_accessor :first_final
320
+ end
321
+ self.first_final = 21
322
+ class << self
323
+ attr_accessor :error
324
+ end
325
+ self.error = 0
332
326
 
333
- def self.parse(data)
334
- data = data.dup.force_encoding(Encoding::ASCII_8BIT) if data.respond_to?(:force_encoding)
327
+ class << self
328
+ attr_accessor :en_comment_tail
329
+ end
330
+ self.en_comment_tail = 9
331
+ class << self
332
+ attr_accessor :en_main
333
+ end
334
+ self.en_main = 1
335
335
 
336
- content_transfer_encoding = ContentTransferEncodingStruct.new("")
337
- return content_transfer_encoding if Mail::Utilities.blank?(data)
336
+ def self.parse(data)
337
+ data = data.dup.force_encoding(Encoding::ASCII_8BIT) if data.respond_to?(:force_encoding)
338
338
 
339
- # Parser state
340
- encoding_s = nil
339
+ content_transfer_encoding = ContentTransferEncodingStruct.new("")
340
+ return content_transfer_encoding if Mail::Utilities.blank?(data)
341
341
 
342
- # 5.1 Variables Used by Ragel
343
- p = 0
344
- eof = pe = data.length
345
- stack = []
342
+ # Parser state
343
+ encoding_s = nil
346
344
 
347
- begin
348
- p ||= 0
349
- pe ||= data.length
350
- cs = start
351
- top = 0
352
- end
345
+ # 5.1 Variables Used by Ragel
346
+ p = 0
347
+ eof = pe = data.length
348
+ stack = []
353
349
 
354
- begin
355
- testEof = false
356
- _slen, _trans, _keys, _inds, _acts, _nacts = nil
357
- _goto_level = 0
358
- _resume = 10
359
- _eof_trans = 15
360
- _again = 20
361
- _test_eof = 30
362
- _out = 40
363
- while true
364
- if _goto_level <= 0
365
- if p == pe
366
- _goto_level = _test_eof
367
- next
368
- end
369
- if cs == 0
370
- _goto_level = _out
371
- next
350
+ begin
351
+ p ||= 0
352
+ pe ||= data.length
353
+ cs = start
354
+ top = 0
355
+ end
356
+
357
+ begin
358
+ testEof = false
359
+ _slen, _trans, _keys, _inds, _acts, _nacts = nil
360
+ _goto_level = 0
361
+ _resume = 10
362
+ _eof_trans = 15
363
+ _again = 20
364
+ _test_eof = 30
365
+ _out = 40
366
+ while true
367
+ if _goto_level <= 0
368
+ if p == pe
369
+ _goto_level = _test_eof
370
+ next
371
+ end
372
+ if cs == 0
373
+ _goto_level = _out
374
+ next
375
+ end
372
376
  end
373
- end
374
- if _goto_level <= _resume
375
- _keys = cs << 1
376
- _inds = _index_offsets[cs]
377
- _slen = _key_spans[cs]
378
- _wide = data[p].ord
379
- _trans = if (_slen > 0 &&
380
- _trans_keys[_keys] <= _wide &&
381
- _wide <= _trans_keys[_keys + 1])
382
- _indicies[_inds + _wide - _trans_keys[_keys]]
383
- else
384
- _indicies[_inds + _slen]
385
- end
386
- cs = _trans_targs[_trans]
387
- if _trans_actions[_trans] != 0
388
- case _trans_actions[_trans]
389
- when 1
390
- begin
391
- encoding_s = p
392
- end
393
- when 10
394
- begin
395
- content_transfer_encoding.encoding = chars(data, encoding_s, p - 1).downcase
396
- end
397
- when 3
398
- begin
399
- end
400
- when 6
401
- begin
402
- end
403
- when 2
404
- begin
377
+ if _goto_level <= _resume
378
+ _keys = cs << 1
379
+ _inds = _index_offsets[cs]
380
+ _slen = _key_spans[cs]
381
+ _wide = data[p].ord
382
+ _trans = if (_slen > 0 &&
383
+ _trans_keys[_keys] <= _wide &&
384
+ _wide <= _trans_keys[_keys + 1])
385
+ _indicies[_inds + _wide - _trans_keys[_keys]]
386
+ else
387
+ _indicies[_inds + _slen]
388
+ end
389
+ cs = _trans_targs[_trans]
390
+ if _trans_actions[_trans] != 0
391
+ case _trans_actions[_trans]
392
+ when 1
405
393
  begin
406
- stack[top] = cs
407
- top += 1
408
- cs = 9
409
- _goto_level = _again
410
- next
394
+ encoding_s = p
411
395
  end
412
- end
413
- when 9
414
- begin
396
+ when 10
415
397
  begin
416
- top -= 1
417
- cs = stack[top]
418
- _goto_level = _again
419
- next
398
+ content_transfer_encoding.encoding = chars(data, encoding_s, p - 1).downcase
420
399
  end
421
- end
422
- when 11
423
- begin
424
- content_transfer_encoding.encoding = chars(data, encoding_s, p - 1).downcase
425
- end
426
- begin
400
+ when 3
427
401
  begin
428
- stack[top] = cs
429
- top += 1
430
- cs = 9
431
- _goto_level = _again
432
- next
433
402
  end
434
- end
435
- when 4
436
- begin
437
- end
438
- begin
439
- encoding_s = p
440
- end
441
- when 5
442
- begin
443
- end
444
- begin
403
+ when 6
445
404
  begin
446
- stack[top] = cs
447
- top += 1
448
- cs = 9
449
- _goto_level = _again
450
- next
451
405
  end
452
- end
453
- when 7
454
- begin
455
- end
456
- begin
406
+ when 2
407
+ begin
408
+ begin
409
+ stack[top] = cs
410
+ top += 1
411
+ cs = 9
412
+ _goto_level = _again
413
+ next
414
+ end
415
+ end
416
+ when 9
417
+ begin
418
+ begin
419
+ top -= 1
420
+ cs = stack[top]
421
+ _goto_level = _again
422
+ next
423
+ end
424
+ end
425
+ when 11
426
+ begin
427
+ content_transfer_encoding.encoding = chars(data, encoding_s, p - 1).downcase
428
+ end
429
+ begin
430
+ begin
431
+ stack[top] = cs
432
+ top += 1
433
+ cs = 9
434
+ _goto_level = _again
435
+ next
436
+ end
437
+ end
438
+ when 4
439
+ begin
440
+ end
441
+ begin
442
+ encoding_s = p
443
+ end
444
+ when 5
445
+ begin
446
+ end
447
+ begin
448
+ begin
449
+ stack[top] = cs
450
+ top += 1
451
+ cs = 9
452
+ _goto_level = _again
453
+ next
454
+ end
455
+ end
456
+ when 7
457
457
  begin
458
- stack[top] = cs
459
- top += 1
460
- cs = 9
461
- _goto_level = _again
462
- next
463
458
  end
464
- end
465
- when 8
466
- begin
467
- end
468
- begin
469
459
  begin
470
- top -= 1
471
- cs = stack[top]
472
- _goto_level = _again
473
- next
460
+ begin
461
+ stack[top] = cs
462
+ top += 1
463
+ cs = 9
464
+ _goto_level = _again
465
+ next
466
+ end
467
+ end
468
+ when 8
469
+ begin
470
+ end
471
+ begin
472
+ begin
473
+ top -= 1
474
+ cs = stack[top]
475
+ _goto_level = _again
476
+ next
477
+ end
474
478
  end
475
479
  end
476
480
  end
477
481
  end
478
- end
479
- if _goto_level <= _again
480
- if cs == 0
481
- _goto_level = _out
482
- next
483
- end
484
- p += 1
485
- if p != pe
486
- _goto_level = _resume
487
- next
482
+ if _goto_level <= _again
483
+ if cs == 0
484
+ _goto_level = _out
485
+ next
486
+ end
487
+ p += 1
488
+ if p != pe
489
+ _goto_level = _resume
490
+ next
491
+ end
488
492
  end
489
- end
490
- if _goto_level <= _test_eof
491
- if p == eof
492
- case _eof_actions[cs]
493
- when 10
494
- begin
495
- content_transfer_encoding.encoding = chars(data, encoding_s, p - 1).downcase
496
- end
497
- when 3
498
- begin
493
+ if _goto_level <= _test_eof
494
+ if p == eof
495
+ case _eof_actions[cs]
496
+ when 10
497
+ begin
498
+ content_transfer_encoding.encoding = chars(data, encoding_s, p - 1).downcase
499
+ end
500
+ when 3
501
+ begin
502
+ end
499
503
  end
500
504
  end
501
505
  end
502
- end
503
- if _goto_level <= _out
504
- break
506
+ if _goto_level <= _out
507
+ break
508
+ end
505
509
  end
506
510
  end
507
- end
508
511
 
509
- if p != eof || cs < 21
510
- raise Mail::Field::IncompleteParseError.new(Mail::ContentTransferEncodingElement, data, p)
511
- end
512
+ if p != eof || cs < 21
513
+ raise Mail::Field::IncompleteParseError.new(Mail::ContentTransferEncodingElement, data, p)
514
+ end
512
515
 
513
- content_transfer_encoding
516
+ content_transfer_encoding
517
+ end
514
518
  end
515
519
  end
520
+ ensure
521
+ $VERBOSE = original_verbose
516
522
  end