mail 2.7.1 → 2.8.0

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 +2 -2
  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,505 +3,511 @@
3
3
  require "mail/utilities"
4
4
  require "mail/parser_tools"
5
5
 
6
- module Mail::Parsers
7
- module MimeVersionParser
8
- extend Mail::ParserTools
6
+ begin
7
+ original_verbose, $VERBOSE = $VERBOSE, nil
9
8
 
10
- MimeVersionStruct = Struct.new(:major, :minor, :error)
9
+ module Mail::Parsers
10
+ module MimeVersionParser
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, 57, 10, 10,
18
- 9, 32, 9, 57, 40,
19
- 57, 46, 46, 40, 57,
20
- 48, 57, 10, 10, 9, 32,
21
- 1, 244, 1, 244, 10,
22
- 10, 9, 32, 0, 244,
23
- 128, 191, 160, 191, 128, 191,
24
- 128, 159, 144, 191, 128,
25
- 191, 128, 143, 9, 57,
26
- 9, 40, 9, 40, 0, 0,
27
- 0,
28
- ]
13
+ MimeVersionStruct = Struct.new(:major, :minor, :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, 49, 1, 24, 49, 18, 1, 18,
36
- 10, 1, 24, 244, 244, 1, 24, 245,
37
- 64, 32, 64, 32, 48, 64, 16, 49,
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, 57, 10, 10,
21
+ 9, 32, 9, 57, 40,
22
+ 57, 46, 46, 40, 57,
23
+ 48, 57, 10, 10, 9, 32,
24
+ 1, 244, 1, 244, 10,
25
+ 10, 9, 32, 0, 244,
26
+ 128, 191, 160, 191, 128, 191,
27
+ 128, 159, 144, 191, 128,
28
+ 191, 128, 143, 9, 57,
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, 50, 52, 77, 127, 146, 148,
47
- 167, 178, 180, 205, 450, 695, 697, 722,
48
- 968, 1033, 1066, 1131, 1164, 1213, 1278, 1295,
49
- 1345, 1378, 1411,
50
- ]
33
+ class << self
34
+ attr_accessor :_key_spans
35
+ private :_key_spans, :_key_spans=
36
+ end
37
+ self._key_spans = [
38
+ 0, 49, 1, 24, 49, 18, 1, 18,
39
+ 10, 1, 24, 244, 244, 1, 24, 245,
40
+ 64, 32, 64, 32, 48, 64, 16, 49,
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
- 1, 1, 1, 1, 1, 1, 1, 3,
61
- 1, 1, 1, 1, 1, 1, 1, 4,
62
- 4, 4, 4, 4, 4, 4, 4, 4,
63
- 4, 1, 5, 1, 0, 1, 1, 1,
64
- 1, 1, 1, 1, 1, 1, 1, 1,
65
- 1, 1, 1, 1, 1, 1, 1, 1,
66
- 1, 1, 1, 0, 1, 6, 1, 1,
67
- 1, 7, 1, 1, 1, 1, 1, 1,
68
- 1, 1, 1, 1, 1, 1, 1, 1,
69
- 1, 1, 1, 1, 6, 1, 1, 1,
70
- 1, 1, 1, 1, 8, 1, 1, 1,
71
- 1, 1, 1, 1, 9, 9, 9, 9,
72
- 9, 9, 9, 9, 9, 9, 1, 10,
73
- 1, 1, 1, 1, 1, 11, 1, 12,
74
- 12, 12, 12, 12, 12, 12, 12, 12,
75
- 12, 1, 13, 1, 14, 1, 1, 1,
76
- 1, 1, 1, 1, 15, 15, 15, 15,
77
- 15, 15, 15, 15, 15, 15, 1, 16,
78
- 16, 16, 16, 16, 16, 16, 16, 16,
79
- 16, 1, 17, 1, 18, 1, 1, 1,
80
- 1, 1, 1, 1, 1, 1, 1, 1,
81
- 1, 1, 1, 1, 1, 1, 1, 1,
82
- 1, 1, 1, 18, 1, 19, 19, 19,
83
- 19, 19, 19, 19, 19, 19, 1, 19,
84
- 19, 20, 19, 19, 19, 19, 19, 19,
85
- 19, 19, 19, 19, 19, 19, 19, 19,
86
- 19, 19, 19, 19, 19, 19, 19, 19,
87
- 19, 19, 19, 19, 21, 22, 19, 19,
88
- 19, 19, 19, 19, 19, 19, 19, 19,
89
- 19, 19, 19, 19, 19, 19, 19, 19,
90
- 19, 19, 19, 19, 19, 19, 19, 19,
91
- 19, 19, 19, 19, 19, 19, 19, 19,
92
- 19, 19, 19, 19, 19, 19, 19, 19,
93
- 19, 19, 19, 19, 19, 19, 19, 19,
94
- 23, 19, 19, 19, 19, 19, 19, 19,
95
- 19, 19, 19, 19, 19, 19, 19, 19,
96
- 19, 19, 19, 19, 19, 19, 19, 19,
97
- 19, 19, 19, 19, 19, 19, 19, 19,
98
- 19, 19, 19, 19, 1, 1, 1, 1,
99
- 1, 1, 1, 1, 1, 1, 1, 1,
100
- 1, 1, 1, 1, 1, 1, 1, 1,
101
- 1, 1, 1, 1, 1, 1, 1, 1,
102
- 1, 1, 1, 1, 1, 1, 1, 1,
103
- 1, 1, 1, 1, 1, 1, 1, 1,
104
- 1, 1, 1, 1, 1, 1, 1, 1,
105
- 1, 1, 1, 1, 1, 1, 1, 1,
106
- 1, 1, 1, 1, 1, 1, 24, 24,
107
- 24, 24, 24, 24, 24, 24, 24, 24,
108
- 24, 24, 24, 24, 24, 24, 24, 24,
109
- 24, 24, 24, 24, 24, 24, 24, 24,
110
- 24, 24, 24, 24, 25, 26, 26, 26,
111
- 26, 26, 26, 26, 26, 26, 26, 26,
112
- 26, 27, 26, 26, 28, 29, 29, 29,
113
- 30, 1, 31, 31, 31, 31, 31, 31,
114
- 31, 31, 31, 1, 31, 31, 32, 31,
115
- 31, 31, 31, 31, 31, 31, 31, 31,
116
- 31, 31, 31, 31, 31, 31, 31, 31,
117
- 31, 31, 31, 31, 31, 31, 31, 31,
118
- 31, 33, 34, 31, 31, 31, 31, 31,
119
- 31, 31, 31, 31, 31, 31, 31, 31,
120
- 31, 31, 31, 31, 31, 31, 31, 31,
121
- 31, 31, 31, 31, 31, 31, 31, 31,
122
- 31, 31, 31, 31, 31, 31, 31, 31,
123
- 31, 31, 31, 31, 31, 31, 31, 31,
124
- 31, 31, 31, 31, 31, 35, 31, 31,
125
- 31, 31, 31, 31, 31, 31, 31, 31,
126
- 31, 31, 31, 31, 31, 31, 31, 31,
127
- 31, 31, 31, 31, 31, 31, 31, 31,
128
- 31, 31, 31, 31, 31, 31, 31, 31,
129
- 31, 1, 1, 1, 1, 1, 1, 1,
130
- 1, 1, 1, 1, 1, 1, 1, 1,
131
- 1, 1, 1, 1, 1, 1, 1, 1,
132
- 1, 1, 1, 1, 1, 1, 1, 1,
133
- 1, 1, 1, 1, 1, 1, 1, 1,
134
- 1, 1, 1, 1, 1, 1, 1, 1,
135
- 1, 1, 1, 1, 1, 1, 1, 1,
136
- 1, 1, 1, 1, 1, 1, 1, 1,
137
- 1, 1, 1, 36, 36, 36, 36, 36,
138
- 36, 36, 36, 36, 36, 36, 36, 36,
139
- 36, 36, 36, 36, 36, 36, 36, 36,
140
- 36, 36, 36, 36, 36, 36, 36, 36,
141
- 36, 37, 38, 38, 38, 38, 38, 38,
142
- 38, 38, 38, 38, 38, 38, 39, 38,
143
- 38, 40, 41, 41, 41, 42, 1, 43,
144
- 1, 31, 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
- 31, 1, 31, 31, 31, 31, 31, 31,
148
- 31, 31, 31, 31, 31, 31, 31, 31,
149
- 31, 31, 31, 31, 31, 31, 31, 31,
150
- 31, 31, 31, 31, 31, 31, 31, 31,
151
- 31, 31, 31, 31, 31, 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, 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, 31, 31, 31, 31, 31,
159
- 31, 31, 31, 31, 31, 31, 31, 31,
160
- 31, 31, 31, 31, 31, 31, 31, 31,
161
- 31, 31, 31, 31, 31, 31, 31, 31,
162
- 31, 31, 31, 31, 31, 31, 31, 31,
163
- 31, 31, 1, 1, 1, 1, 1, 1,
164
- 1, 1, 1, 1, 1, 1, 1, 1,
165
- 1, 1, 1, 1, 1, 1, 1, 1,
166
- 1, 1, 1, 1, 1, 1, 1, 1,
167
- 1, 1, 1, 1, 1, 1, 1, 1,
168
- 1, 1, 1, 1, 1, 1, 1, 1,
169
- 1, 1, 1, 1, 1, 1, 1, 1,
170
- 1, 1, 1, 1, 1, 1, 1, 1,
171
- 1, 1, 1, 1, 36, 36, 36, 36,
172
- 36, 36, 36, 36, 36, 36, 36, 36,
173
- 36, 36, 36, 36, 36, 36, 36, 36,
174
- 36, 36, 36, 36, 36, 36, 36, 36,
175
- 36, 36, 37, 38, 38, 38, 38, 38,
176
- 38, 38, 38, 38, 38, 38, 38, 39,
177
- 38, 38, 40, 41, 41, 41, 42, 1,
178
- 31, 31, 31, 31, 31, 31, 31, 31,
179
- 31, 31, 31, 31, 31, 31, 31, 31,
180
- 31, 31, 31, 31, 31, 31, 31, 31,
181
- 31, 31, 31, 31, 31, 31, 31, 31,
182
- 31, 31, 31, 31, 31, 31, 31, 31,
183
- 31, 31, 31, 31, 31, 31, 31, 31,
184
- 31, 31, 31, 31, 31, 31, 31, 31,
185
- 31, 31, 31, 31, 31, 31, 31, 31,
186
- 1, 36, 36, 36, 36, 36, 36, 36,
187
- 36, 36, 36, 36, 36, 36, 36, 36,
188
- 36, 36, 36, 36, 36, 36, 36, 36,
189
- 36, 36, 36, 36, 36, 36, 36, 36,
190
- 36, 1, 36, 36, 36, 36, 36, 36,
191
- 36, 36, 36, 36, 36, 36, 36, 36,
192
- 36, 36, 36, 36, 36, 36, 36, 36,
193
- 36, 36, 36, 36, 36, 36, 36, 36,
194
- 36, 36, 36, 36, 36, 36, 36, 36,
195
- 36, 36, 36, 36, 36, 36, 36, 36,
196
- 36, 36, 36, 36, 36, 36, 36, 36,
197
- 36, 36, 36, 36, 36, 36, 36, 36,
198
- 36, 36, 1, 36, 36, 36, 36, 36,
199
- 36, 36, 36, 36, 36, 36, 36, 36,
200
- 36, 36, 36, 36, 36, 36, 36, 36,
201
- 36, 36, 36, 36, 36, 36, 36, 36,
202
- 36, 36, 36, 1, 38, 38, 38, 38,
203
- 38, 38, 38, 38, 38, 38, 38, 38,
204
- 38, 38, 38, 38, 38, 38, 38, 38,
205
- 38, 38, 38, 38, 38, 38, 38, 38,
206
- 38, 38, 38, 38, 38, 38, 38, 38,
207
- 38, 38, 38, 38, 38, 38, 38, 38,
208
- 38, 38, 38, 38, 1, 38, 38, 38,
209
- 38, 38, 38, 38, 38, 38, 38, 38,
210
- 38, 38, 38, 38, 38, 38, 38, 38,
211
- 38, 38, 38, 38, 38, 38, 38, 38,
212
- 38, 38, 38, 38, 38, 38, 38, 38,
213
- 38, 38, 38, 38, 38, 38, 38, 38,
214
- 38, 38, 38, 38, 38, 38, 38, 38,
215
- 38, 38, 38, 38, 38, 38, 38, 38,
216
- 38, 38, 38, 38, 38, 1, 38, 38,
217
- 38, 38, 38, 38, 38, 38, 38, 38,
218
- 38, 38, 38, 38, 38, 38, 1, 44,
219
- 1, 1, 1, 45, 1, 1, 1, 1,
220
- 1, 1, 1, 1, 1, 1, 1, 1,
221
- 1, 1, 1, 1, 1, 1, 44, 1,
222
- 1, 1, 1, 1, 1, 1, 46, 1,
223
- 1, 1, 1, 1, 1, 1, 47, 47,
224
- 47, 47, 47, 47, 47, 47, 47, 47,
225
- 1, 18, 1, 1, 1, 48, 1, 1,
226
- 1, 1, 1, 1, 1, 1, 1, 1,
227
- 1, 1, 1, 1, 1, 1, 1, 1,
228
- 18, 1, 1, 1, 1, 1, 1, 1,
229
- 49, 1, 50, 1, 1, 1, 51, 1,
230
- 1, 1, 1, 1, 1, 1, 1, 1,
231
- 1, 1, 1, 1, 1, 1, 1, 1,
232
- 1, 50, 1, 1, 1, 1, 1, 1,
233
- 1, 52, 1, 1, 0,
234
- ]
44
+ class << self
45
+ attr_accessor :_index_offsets
46
+ private :_index_offsets, :_index_offsets=
47
+ end
48
+ self._index_offsets = [
49
+ 0, 0, 50, 52, 77, 127, 146, 148,
50
+ 167, 178, 180, 205, 450, 695, 697, 722,
51
+ 968, 1033, 1066, 1131, 1164, 1213, 1278, 1295,
52
+ 1345, 1378, 1411,
53
+ ]
235
54
 
236
- class << self
237
- attr_accessor :_trans_targs
238
- private :_trans_targs, :_trans_targs=
239
- end
240
- self._trans_targs = [
241
- 1, 0, 2, 4, 5, 3, 1, 2,
242
- 4, 5, 6, 7, 5, 7, 8, 23,
243
- 23, 10, 24, 12, 13, 12, 26, 15,
244
- 16, 17, 18, 19, 20, 21, 22, 12,
245
- 13, 12, 26, 15, 16, 17, 18, 19,
246
- 20, 21, 22, 14, 24, 9, 25, 23,
247
- 9, 25, 24, 9, 25,
248
- ]
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
+ 1, 1, 1, 1, 1, 1, 1, 3,
64
+ 1, 1, 1, 1, 1, 1, 1, 4,
65
+ 4, 4, 4, 4, 4, 4, 4, 4,
66
+ 4, 1, 5, 1, 0, 1, 1, 1,
67
+ 1, 1, 1, 1, 1, 1, 1, 1,
68
+ 1, 1, 1, 1, 1, 1, 1, 1,
69
+ 1, 1, 1, 0, 1, 6, 1, 1,
70
+ 1, 7, 1, 1, 1, 1, 1, 1,
71
+ 1, 1, 1, 1, 1, 1, 1, 1,
72
+ 1, 1, 1, 1, 6, 1, 1, 1,
73
+ 1, 1, 1, 1, 8, 1, 1, 1,
74
+ 1, 1, 1, 1, 9, 9, 9, 9,
75
+ 9, 9, 9, 9, 9, 9, 1, 10,
76
+ 1, 1, 1, 1, 1, 11, 1, 12,
77
+ 12, 12, 12, 12, 12, 12, 12, 12,
78
+ 12, 1, 13, 1, 14, 1, 1, 1,
79
+ 1, 1, 1, 1, 15, 15, 15, 15,
80
+ 15, 15, 15, 15, 15, 15, 1, 16,
81
+ 16, 16, 16, 16, 16, 16, 16, 16,
82
+ 16, 1, 17, 1, 18, 1, 1, 1,
83
+ 1, 1, 1, 1, 1, 1, 1, 1,
84
+ 1, 1, 1, 1, 1, 1, 1, 1,
85
+ 1, 1, 1, 18, 1, 19, 19, 19,
86
+ 19, 19, 19, 19, 19, 19, 1, 19,
87
+ 19, 20, 19, 19, 19, 19, 19, 19,
88
+ 19, 19, 19, 19, 19, 19, 19, 19,
89
+ 19, 19, 19, 19, 19, 19, 19, 19,
90
+ 19, 19, 19, 19, 21, 22, 19, 19,
91
+ 19, 19, 19, 19, 19, 19, 19, 19,
92
+ 19, 19, 19, 19, 19, 19, 19, 19,
93
+ 19, 19, 19, 19, 19, 19, 19, 19,
94
+ 19, 19, 19, 19, 19, 19, 19, 19,
95
+ 19, 19, 19, 19, 19, 19, 19, 19,
96
+ 19, 19, 19, 19, 19, 19, 19, 19,
97
+ 23, 19, 19, 19, 19, 19, 19, 19,
98
+ 19, 19, 19, 19, 19, 19, 19, 19,
99
+ 19, 19, 19, 19, 19, 19, 19, 19,
100
+ 19, 19, 19, 19, 19, 19, 19, 19,
101
+ 19, 19, 19, 19, 1, 1, 1, 1,
102
+ 1, 1, 1, 1, 1, 1, 1, 1,
103
+ 1, 1, 1, 1, 1, 1, 1, 1,
104
+ 1, 1, 1, 1, 1, 1, 1, 1,
105
+ 1, 1, 1, 1, 1, 1, 1, 1,
106
+ 1, 1, 1, 1, 1, 1, 1, 1,
107
+ 1, 1, 1, 1, 1, 1, 1, 1,
108
+ 1, 1, 1, 1, 1, 1, 1, 1,
109
+ 1, 1, 1, 1, 1, 1, 24, 24,
110
+ 24, 24, 24, 24, 24, 24, 24, 24,
111
+ 24, 24, 24, 24, 24, 24, 24, 24,
112
+ 24, 24, 24, 24, 24, 24, 24, 24,
113
+ 24, 24, 24, 24, 25, 26, 26, 26,
114
+ 26, 26, 26, 26, 26, 26, 26, 26,
115
+ 26, 27, 26, 26, 28, 29, 29, 29,
116
+ 30, 1, 31, 31, 31, 31, 31, 31,
117
+ 31, 31, 31, 1, 31, 31, 32, 31,
118
+ 31, 31, 31, 31, 31, 31, 31, 31,
119
+ 31, 31, 31, 31, 31, 31, 31, 31,
120
+ 31, 31, 31, 31, 31, 31, 31, 31,
121
+ 31, 33, 34, 31, 31, 31, 31, 31,
122
+ 31, 31, 31, 31, 31, 31, 31, 31,
123
+ 31, 31, 31, 31, 31, 31, 31, 31,
124
+ 31, 31, 31, 31, 31, 31, 31, 31,
125
+ 31, 31, 31, 31, 31, 31, 31, 31,
126
+ 31, 31, 31, 31, 31, 31, 31, 31,
127
+ 31, 31, 31, 31, 31, 35, 31, 31,
128
+ 31, 31, 31, 31, 31, 31, 31, 31,
129
+ 31, 31, 31, 31, 31, 31, 31, 31,
130
+ 31, 31, 31, 31, 31, 31, 31, 31,
131
+ 31, 31, 31, 31, 31, 31, 31, 31,
132
+ 31, 1, 1, 1, 1, 1, 1, 1,
133
+ 1, 1, 1, 1, 1, 1, 1, 1,
134
+ 1, 1, 1, 1, 1, 1, 1, 1,
135
+ 1, 1, 1, 1, 1, 1, 1, 1,
136
+ 1, 1, 1, 1, 1, 1, 1, 1,
137
+ 1, 1, 1, 1, 1, 1, 1, 1,
138
+ 1, 1, 1, 1, 1, 1, 1, 1,
139
+ 1, 1, 1, 1, 1, 1, 1, 1,
140
+ 1, 1, 1, 36, 36, 36, 36, 36,
141
+ 36, 36, 36, 36, 36, 36, 36, 36,
142
+ 36, 36, 36, 36, 36, 36, 36, 36,
143
+ 36, 36, 36, 36, 36, 36, 36, 36,
144
+ 36, 37, 38, 38, 38, 38, 38, 38,
145
+ 38, 38, 38, 38, 38, 38, 39, 38,
146
+ 38, 40, 41, 41, 41, 42, 1, 43,
147
+ 1, 31, 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
+ 31, 1, 31, 31, 31, 31, 31, 31,
151
+ 31, 31, 31, 31, 31, 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, 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, 31, 31, 31, 31, 31,
159
+ 31, 31, 31, 31, 31, 31, 31, 31,
160
+ 31, 31, 31, 31, 31, 31, 31, 31,
161
+ 31, 31, 31, 31, 31, 31, 31, 31,
162
+ 31, 31, 31, 31, 31, 31, 31, 31,
163
+ 31, 31, 31, 31, 31, 31, 31, 31,
164
+ 31, 31, 31, 31, 31, 31, 31, 31,
165
+ 31, 31, 31, 31, 31, 31, 31, 31,
166
+ 31, 31, 1, 1, 1, 1, 1, 1,
167
+ 1, 1, 1, 1, 1, 1, 1, 1,
168
+ 1, 1, 1, 1, 1, 1, 1, 1,
169
+ 1, 1, 1, 1, 1, 1, 1, 1,
170
+ 1, 1, 1, 1, 1, 1, 1, 1,
171
+ 1, 1, 1, 1, 1, 1, 1, 1,
172
+ 1, 1, 1, 1, 1, 1, 1, 1,
173
+ 1, 1, 1, 1, 1, 1, 1, 1,
174
+ 1, 1, 1, 1, 36, 36, 36, 36,
175
+ 36, 36, 36, 36, 36, 36, 36, 36,
176
+ 36, 36, 36, 36, 36, 36, 36, 36,
177
+ 36, 36, 36, 36, 36, 36, 36, 36,
178
+ 36, 36, 37, 38, 38, 38, 38, 38,
179
+ 38, 38, 38, 38, 38, 38, 38, 39,
180
+ 38, 38, 40, 41, 41, 41, 42, 1,
181
+ 31, 31, 31, 31, 31, 31, 31, 31,
182
+ 31, 31, 31, 31, 31, 31, 31, 31,
183
+ 31, 31, 31, 31, 31, 31, 31, 31,
184
+ 31, 31, 31, 31, 31, 31, 31, 31,
185
+ 31, 31, 31, 31, 31, 31, 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
+ 1, 36, 36, 36, 36, 36, 36, 36,
190
+ 36, 36, 36, 36, 36, 36, 36, 36,
191
+ 36, 36, 36, 36, 36, 36, 36, 36,
192
+ 36, 36, 36, 36, 36, 36, 36, 36,
193
+ 36, 1, 36, 36, 36, 36, 36, 36,
194
+ 36, 36, 36, 36, 36, 36, 36, 36,
195
+ 36, 36, 36, 36, 36, 36, 36, 36,
196
+ 36, 36, 36, 36, 36, 36, 36, 36,
197
+ 36, 36, 36, 36, 36, 36, 36, 36,
198
+ 36, 36, 36, 36, 36, 36, 36, 36,
199
+ 36, 36, 36, 36, 36, 36, 36, 36,
200
+ 36, 36, 36, 36, 36, 36, 36, 36,
201
+ 36, 36, 1, 36, 36, 36, 36, 36,
202
+ 36, 36, 36, 36, 36, 36, 36, 36,
203
+ 36, 36, 36, 36, 36, 36, 36, 36,
204
+ 36, 36, 36, 36, 36, 36, 36, 36,
205
+ 36, 36, 36, 1, 38, 38, 38, 38,
206
+ 38, 38, 38, 38, 38, 38, 38, 38,
207
+ 38, 38, 38, 38, 38, 38, 38, 38,
208
+ 38, 38, 38, 38, 38, 38, 38, 38,
209
+ 38, 38, 38, 38, 38, 38, 38, 38,
210
+ 38, 38, 38, 38, 38, 38, 38, 38,
211
+ 38, 38, 38, 38, 1, 38, 38, 38,
212
+ 38, 38, 38, 38, 38, 38, 38, 38,
213
+ 38, 38, 38, 38, 38, 38, 38, 38,
214
+ 38, 38, 38, 38, 38, 38, 38, 38,
215
+ 38, 38, 38, 38, 38, 38, 38, 38,
216
+ 38, 38, 38, 38, 38, 38, 38, 38,
217
+ 38, 38, 38, 38, 38, 38, 38, 38,
218
+ 38, 38, 38, 38, 38, 38, 38, 38,
219
+ 38, 38, 38, 38, 38, 1, 38, 38,
220
+ 38, 38, 38, 38, 38, 38, 38, 38,
221
+ 38, 38, 38, 38, 38, 38, 1, 44,
222
+ 1, 1, 1, 45, 1, 1, 1, 1,
223
+ 1, 1, 1, 1, 1, 1, 1, 1,
224
+ 1, 1, 1, 1, 1, 1, 44, 1,
225
+ 1, 1, 1, 1, 1, 1, 46, 1,
226
+ 1, 1, 1, 1, 1, 1, 47, 47,
227
+ 47, 47, 47, 47, 47, 47, 47, 47,
228
+ 1, 18, 1, 1, 1, 48, 1, 1,
229
+ 1, 1, 1, 1, 1, 1, 1, 1,
230
+ 1, 1, 1, 1, 1, 1, 1, 1,
231
+ 18, 1, 1, 1, 1, 1, 1, 1,
232
+ 49, 1, 50, 1, 1, 1, 51, 1,
233
+ 1, 1, 1, 1, 1, 1, 1, 1,
234
+ 1, 1, 1, 1, 1, 1, 1, 1,
235
+ 1, 50, 1, 1, 1, 1, 1, 1,
236
+ 1, 52, 1, 1, 0,
237
+ ]
249
238
 
250
- class << self
251
- attr_accessor :_trans_actions
252
- private :_trans_actions, :_trans_actions=
253
- end
254
- self._trans_actions = [
255
- 0, 0, 0, 1, 2, 0, 3, 3,
256
- 4, 5, 6, 7, 0, 3, 1, 8,
257
- 9, 0, 0, 10, 10, 11, 12, 10,
258
- 10, 10, 10, 10, 10, 10, 10, 0,
259
- 0, 1, 13, 0, 0, 0, 0, 0,
260
- 0, 0, 0, 0, 14, 14, 15, 0,
261
- 0, 1, 3, 3, 4,
262
- ]
239
+ class << self
240
+ attr_accessor :_trans_targs
241
+ private :_trans_targs, :_trans_targs=
242
+ end
243
+ self._trans_targs = [
244
+ 1, 0, 2, 4, 5, 3, 1, 2,
245
+ 4, 5, 6, 7, 5, 7, 8, 23,
246
+ 23, 10, 24, 12, 13, 12, 26, 15,
247
+ 16, 17, 18, 19, 20, 21, 22, 12,
248
+ 13, 12, 26, 15, 16, 17, 18, 19,
249
+ 20, 21, 22, 14, 24, 9, 25, 23,
250
+ 9, 25, 24, 9, 25,
251
+ ]
263
252
 
264
- class << self
265
- attr_accessor :_eof_actions
266
- private :_eof_actions, :_eof_actions=
267
- end
268
- self._eof_actions = [
269
- 0, 0, 0, 0, 0, 0, 0, 0,
270
- 0, 0, 0, 0, 0, 0, 0, 0,
271
- 0, 0, 0, 0, 0, 0, 0, 14,
272
- 0, 3, 0,
273
- ]
253
+ class << self
254
+ attr_accessor :_trans_actions
255
+ private :_trans_actions, :_trans_actions=
256
+ end
257
+ self._trans_actions = [
258
+ 0, 0, 0, 1, 2, 0, 3, 3,
259
+ 4, 5, 6, 7, 0, 3, 1, 8,
260
+ 9, 0, 0, 10, 10, 11, 12, 10,
261
+ 10, 10, 10, 10, 10, 10, 10, 0,
262
+ 0, 1, 13, 0, 0, 0, 0, 0,
263
+ 0, 0, 0, 0, 14, 14, 15, 0,
264
+ 0, 1, 3, 3, 4,
265
+ ]
274
266
 
275
- class << self
276
- attr_accessor :start
277
- end
278
- self.start = 1
279
- class << self
280
- attr_accessor :first_final
281
- end
282
- self.first_final = 23
283
- class << self
284
- attr_accessor :error
285
- end
286
- self.error = 0
267
+ class << self
268
+ attr_accessor :_eof_actions
269
+ private :_eof_actions, :_eof_actions=
270
+ end
271
+ self._eof_actions = [
272
+ 0, 0, 0, 0, 0, 0, 0, 0,
273
+ 0, 0, 0, 0, 0, 0, 0, 0,
274
+ 0, 0, 0, 0, 0, 0, 0, 14,
275
+ 0, 3, 0,
276
+ ]
287
277
 
288
- class << self
289
- attr_accessor :en_comment_tail
290
- end
291
- self.en_comment_tail = 11
292
- class << self
293
- attr_accessor :en_main
294
- end
295
- self.en_main = 1
278
+ class << self
279
+ attr_accessor :start
280
+ end
281
+ self.start = 1
282
+ class << self
283
+ attr_accessor :first_final
284
+ end
285
+ self.first_final = 23
286
+ class << self
287
+ attr_accessor :error
288
+ end
289
+ self.error = 0
296
290
 
297
- def self.parse(data)
298
- data = data.dup.force_encoding(Encoding::ASCII_8BIT) if data.respond_to?(:force_encoding)
291
+ class << self
292
+ attr_accessor :en_comment_tail
293
+ end
294
+ self.en_comment_tail = 11
295
+ class << self
296
+ attr_accessor :en_main
297
+ end
298
+ self.en_main = 1
299
299
 
300
- return MimeVersionStruct.new("", nil) if Mail::Utilities.blank?(data)
300
+ def self.parse(data)
301
+ data = data.dup.force_encoding(Encoding::ASCII_8BIT) if data.respond_to?(:force_encoding)
301
302
 
302
- # Parser state
303
- mime_version = MimeVersionStruct.new
304
- major_digits_s = minor_digits_s = nil
303
+ return MimeVersionStruct.new("", nil) if Mail::Utilities.blank?(data)
305
304
 
306
- # 5.1 Variables Used by Ragel
307
- p = 0
308
- eof = pe = data.length
309
- stack = []
305
+ # Parser state
306
+ mime_version = MimeVersionStruct.new
307
+ major_digits_s = minor_digits_s = nil
310
308
 
311
- begin
312
- p ||= 0
313
- pe ||= data.length
314
- cs = start
315
- top = 0
316
- end
309
+ # 5.1 Variables Used by Ragel
310
+ p = 0
311
+ eof = pe = data.length
312
+ stack = []
317
313
 
318
- begin
319
- testEof = false
320
- _slen, _trans, _keys, _inds, _acts, _nacts = nil
321
- _goto_level = 0
322
- _resume = 10
323
- _eof_trans = 15
324
- _again = 20
325
- _test_eof = 30
326
- _out = 40
327
- while true
328
- if _goto_level <= 0
329
- if p == pe
330
- _goto_level = _test_eof
331
- next
332
- end
333
- if cs == 0
334
- _goto_level = _out
335
- next
314
+ begin
315
+ p ||= 0
316
+ pe ||= data.length
317
+ cs = start
318
+ top = 0
319
+ end
320
+
321
+ begin
322
+ testEof = false
323
+ _slen, _trans, _keys, _inds, _acts, _nacts = nil
324
+ _goto_level = 0
325
+ _resume = 10
326
+ _eof_trans = 15
327
+ _again = 20
328
+ _test_eof = 30
329
+ _out = 40
330
+ while true
331
+ if _goto_level <= 0
332
+ if p == pe
333
+ _goto_level = _test_eof
334
+ next
335
+ end
336
+ if cs == 0
337
+ _goto_level = _out
338
+ next
339
+ end
336
340
  end
337
- end
338
- if _goto_level <= _resume
339
- _keys = cs << 1
340
- _inds = _index_offsets[cs]
341
- _slen = _key_spans[cs]
342
- _wide = data[p].ord
343
- _trans = if (_slen > 0 &&
344
- _trans_keys[_keys] <= _wide &&
345
- _wide <= _trans_keys[_keys + 1])
346
- _indicies[_inds + _wide - _trans_keys[_keys]]
347
- else
348
- _indicies[_inds + _slen]
349
- end
350
- cs = _trans_targs[_trans]
351
- if _trans_actions[_trans] != 0
352
- case _trans_actions[_trans]
353
- when 2
354
- begin
355
- major_digits_s = p
356
- end
357
- when 7
358
- begin
359
- mime_version.major = chars(data, major_digits_s, p - 1)
360
- end
361
- when 8
362
- begin
363
- minor_digits_s = p
364
- end
365
- when 14
366
- begin
367
- mime_version.minor = chars(data, minor_digits_s, p - 1)
368
- end
369
- when 10
370
- begin
371
- end
372
- when 3
373
- begin
374
- end
375
- when 1
376
- begin
341
+ if _goto_level <= _resume
342
+ _keys = cs << 1
343
+ _inds = _index_offsets[cs]
344
+ _slen = _key_spans[cs]
345
+ _wide = data[p].ord
346
+ _trans = if (_slen > 0 &&
347
+ _trans_keys[_keys] <= _wide &&
348
+ _wide <= _trans_keys[_keys + 1])
349
+ _indicies[_inds + _wide - _trans_keys[_keys]]
350
+ else
351
+ _indicies[_inds + _slen]
352
+ end
353
+ cs = _trans_targs[_trans]
354
+ if _trans_actions[_trans] != 0
355
+ case _trans_actions[_trans]
356
+ when 2
377
357
  begin
378
- stack[top] = cs
379
- top += 1
380
- cs = 11
381
- _goto_level = _again
382
- next
358
+ major_digits_s = p
383
359
  end
384
- end
385
- when 13
386
- begin
360
+ when 7
387
361
  begin
388
- top -= 1
389
- cs = stack[top]
390
- _goto_level = _again
391
- next
362
+ mime_version.major = chars(data, major_digits_s, p - 1)
392
363
  end
393
- end
394
- when 6
395
- begin
396
- mime_version.major = chars(data, major_digits_s, p - 1)
397
- end
398
- begin
364
+ when 8
399
365
  begin
400
- stack[top] = cs
401
- top += 1
402
- cs = 11
403
- _goto_level = _again
404
- next
366
+ minor_digits_s = p
405
367
  end
406
- end
407
- when 15
408
- begin
409
- mime_version.minor = chars(data, minor_digits_s, p - 1)
410
- end
411
- begin
368
+ when 14
412
369
  begin
413
- stack[top] = cs
414
- top += 1
415
- cs = 11
416
- _goto_level = _again
417
- next
370
+ mime_version.minor = chars(data, minor_digits_s, p - 1)
418
371
  end
419
- end
420
- when 11
421
- begin
422
- end
423
- begin
372
+ when 10
424
373
  begin
425
- stack[top] = cs
426
- top += 1
427
- cs = 11
428
- _goto_level = _again
429
- next
430
374
  end
431
- end
432
- when 12
433
- begin
434
- end
435
- begin
375
+ when 3
376
+ begin
377
+ end
378
+ when 1
379
+ begin
380
+ begin
381
+ stack[top] = cs
382
+ top += 1
383
+ cs = 11
384
+ _goto_level = _again
385
+ next
386
+ end
387
+ end
388
+ when 13
389
+ begin
390
+ begin
391
+ top -= 1
392
+ cs = stack[top]
393
+ _goto_level = _again
394
+ next
395
+ end
396
+ end
397
+ when 6
398
+ begin
399
+ mime_version.major = chars(data, major_digits_s, p - 1)
400
+ end
401
+ begin
402
+ begin
403
+ stack[top] = cs
404
+ top += 1
405
+ cs = 11
406
+ _goto_level = _again
407
+ next
408
+ end
409
+ end
410
+ when 15
411
+ begin
412
+ mime_version.minor = chars(data, minor_digits_s, p - 1)
413
+ end
414
+ begin
415
+ begin
416
+ stack[top] = cs
417
+ top += 1
418
+ cs = 11
419
+ _goto_level = _again
420
+ next
421
+ end
422
+ end
423
+ when 11
424
+ begin
425
+ end
426
+ begin
427
+ begin
428
+ stack[top] = cs
429
+ top += 1
430
+ cs = 11
431
+ _goto_level = _again
432
+ next
433
+ end
434
+ end
435
+ when 12
436
+ begin
437
+ end
438
+ begin
439
+ begin
440
+ top -= 1
441
+ cs = stack[top]
442
+ _goto_level = _again
443
+ next
444
+ end
445
+ end
446
+ when 5
436
447
  begin
437
- top -= 1
438
- cs = stack[top]
439
- _goto_level = _again
440
- next
441
448
  end
442
- end
443
- when 5
444
- begin
445
- end
446
- begin
447
- major_digits_s = p
448
- end
449
- when 9
450
- begin
451
- end
452
- begin
453
- minor_digits_s = p
454
- end
455
- when 4
456
- begin
457
- end
458
- begin
459
449
  begin
460
- stack[top] = cs
461
- top += 1
462
- cs = 11
463
- _goto_level = _again
464
- next
450
+ major_digits_s = p
451
+ end
452
+ when 9
453
+ begin
454
+ end
455
+ begin
456
+ minor_digits_s = p
457
+ end
458
+ when 4
459
+ begin
460
+ end
461
+ begin
462
+ begin
463
+ stack[top] = cs
464
+ top += 1
465
+ cs = 11
466
+ _goto_level = _again
467
+ next
468
+ end
465
469
  end
466
470
  end
467
471
  end
468
472
  end
469
- end
470
- if _goto_level <= _again
471
- if cs == 0
472
- _goto_level = _out
473
- next
474
- end
475
- p += 1
476
- if p != pe
477
- _goto_level = _resume
478
- next
473
+ if _goto_level <= _again
474
+ if cs == 0
475
+ _goto_level = _out
476
+ next
477
+ end
478
+ p += 1
479
+ if p != pe
480
+ _goto_level = _resume
481
+ next
482
+ end
479
483
  end
480
- end
481
- if _goto_level <= _test_eof
482
- if p == eof
483
- case _eof_actions[cs]
484
- when 14
485
- begin
486
- mime_version.minor = chars(data, minor_digits_s, p - 1)
487
- end
488
- when 3
489
- begin
484
+ if _goto_level <= _test_eof
485
+ if p == eof
486
+ case _eof_actions[cs]
487
+ when 14
488
+ begin
489
+ mime_version.minor = chars(data, minor_digits_s, p - 1)
490
+ end
491
+ when 3
492
+ begin
493
+ end
490
494
  end
491
495
  end
492
496
  end
493
- end
494
- if _goto_level <= _out
495
- break
497
+ if _goto_level <= _out
498
+ break
499
+ end
496
500
  end
497
501
  end
498
- end
499
502
 
500
- if p != eof || cs < 23
501
- raise Mail::Field::IncompleteParseError.new(Mail::MimeVersionElement, data, p)
502
- end
503
+ if p != eof || cs < 23
504
+ raise Mail::Field::IncompleteParseError.new(Mail::MimeVersionElement, data, p)
505
+ end
503
506
 
504
- mime_version
507
+ mime_version
508
+ end
505
509
  end
506
510
  end
511
+ ensure
512
+ $VERBOSE = original_verbose
507
513
  end