psych 3.0.3.pre2-java → 3.2.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,10 @@
1
+
1
2
  # frozen_string_literal: true
2
3
  module Psych
3
- # The version is Psych you're using
4
- VERSION = '3.0.3.pre2'
4
+ # The version of Psych you are using
5
+ VERSION = '3.2.0'
5
6
 
6
7
  if RUBY_ENGINE == 'jruby'
7
- DEFAULT_SNAKEYAML_VERSION = '1.23'.freeze
8
+ DEFAULT_SNAKEYAML_VERSION = '1.26'.freeze
8
9
  end
9
10
  end
@@ -12,34 +12,38 @@ module Psych
12
12
  ###
13
13
  # This class walks a YAML AST, converting each node to Ruby
14
14
  class ToRuby < Psych::Visitors::Visitor
15
- def self.create
15
+ def self.create(symbolize_names: false, freeze: false)
16
16
  class_loader = ClassLoader.new
17
17
  scanner = ScalarScanner.new class_loader
18
- new(scanner, class_loader)
18
+ new(scanner, class_loader, symbolize_names: symbolize_names, freeze: freeze)
19
19
  end
20
20
 
21
21
  attr_reader :class_loader
22
22
 
23
- def initialize ss, class_loader
23
+ def initialize ss, class_loader, symbolize_names: false, freeze: false
24
24
  super()
25
25
  @st = {}
26
26
  @ss = ss
27
27
  @domain_types = Psych.domain_types
28
28
  @class_loader = class_loader
29
+ @symbolize_names = symbolize_names
30
+ @freeze = freeze
29
31
  end
30
32
 
31
33
  def accept target
32
34
  result = super
33
- return result if @domain_types.empty? || !target.tag
34
35
 
35
- key = target.tag.sub(/^[!\/]*/, '').sub(/(,\d+)\//, '\1:')
36
- key = "tag:#{key}" unless key =~ /^(?:tag:|x-private)/
36
+ unless @domain_types.empty? || !target.tag
37
+ key = target.tag.sub(/^[!\/]*/, '').sub(/(,\d+)\//, '\1:')
38
+ key = "tag:#{key}" unless key =~ /^(?:tag:|x-private)/
37
39
 
38
- if @domain_types.key? key
39
- value, block = @domain_types[key]
40
- return block.call value, result
40
+ if @domain_types.key? key
41
+ value, block = @domain_types[key]
42
+ result = block.call value, result
43
+ end
41
44
  end
42
45
 
46
+ result = deduplicate(result).freeze if @freeze
43
47
  result
44
48
  end
45
49
 
@@ -252,6 +256,8 @@ module Psych
252
256
 
253
257
  e = build_exception((resolve_class($1) || class_loader.exception),
254
258
  h.delete('message'))
259
+
260
+ e.set_backtrace h.delete('backtrace') if h.key? 'backtrace'
255
261
  init_with(e, h, o)
256
262
 
257
263
  when '!set', 'tag:yaml.org,2002:set'
@@ -331,13 +337,12 @@ module Psych
331
337
  list
332
338
  end
333
339
 
334
- SHOVEL = '<<'
335
340
  def revive_hash hash, o
336
341
  o.children.each_slice(2) { |k,v|
337
342
  key = accept(k)
338
343
  val = accept(v)
339
344
 
340
- if key == SHOVEL && k.tag != "tag:yaml.org,2002:str"
345
+ if key == '<<' && k.tag != "tag:yaml.org,2002:str"
341
346
  case v
342
347
  when Nodes::Alias, Nodes::Mapping
343
348
  begin
@@ -359,6 +364,12 @@ module Psych
359
364
  hash[key] = val
360
365
  end
361
366
  else
367
+ if @symbolize_names
368
+ key = key.to_sym
369
+ elsif !@freeze
370
+ key = deduplicate(key)
371
+ end
372
+
362
373
  hash[key] = val
363
374
  end
364
375
 
@@ -366,6 +377,26 @@ module Psych
366
377
  hash
367
378
  end
368
379
 
380
+ if RUBY_VERSION < '2.7'
381
+ def deduplicate key
382
+ if key.is_a?(String)
383
+ # It is important to untaint the string, otherwise it won't
384
+ # be deduplicated into an fstring, but simply frozen.
385
+ -(key.untaint)
386
+ else
387
+ key
388
+ end
389
+ end
390
+ else
391
+ def deduplicate key
392
+ if key.is_a?(String)
393
+ -key
394
+ else
395
+ key
396
+ end
397
+ end
398
+ end
399
+
369
400
  def merge_key hash, key, val
370
401
  end
371
402
 
@@ -181,41 +181,11 @@ module Psych
181
181
  end
182
182
 
183
183
  def visit_Exception o
184
- tag = ['!ruby/exception', o.class.name].join ':'
185
-
186
- @emitter.start_mapping nil, tag, false, Nodes::Mapping::BLOCK
187
-
188
- {
189
- 'message' => private_iv_get(o, 'mesg'),
190
- 'backtrace' => private_iv_get(o, 'backtrace'),
191
- }.each do |k,v|
192
- next unless v
193
- @emitter.scalar k, nil, nil, true, false, Nodes::Scalar::ANY
194
- accept v
195
- end
196
-
197
- dump_ivars o
198
-
199
- @emitter.end_mapping
184
+ dump_exception o, o.message.to_s
200
185
  end
201
186
 
202
187
  def visit_NameError o
203
- tag = ['!ruby/exception', o.class.name].join ':'
204
-
205
- @emitter.start_mapping nil, tag, false, Nodes::Mapping::BLOCK
206
-
207
- {
208
- 'message' => o.message.to_s,
209
- 'backtrace' => private_iv_get(o, 'backtrace'),
210
- }.each do |k,v|
211
- next unless v
212
- @emitter.scalar k, nil, nil, true, false, Nodes::Scalar::ANY
213
- accept v
214
- end
215
-
216
- dump_ivars o
217
-
218
- @emitter.end_mapping
188
+ dump_exception o, o.message.to_s
219
189
  end
220
190
 
221
191
  def visit_Regexp o
@@ -458,15 +428,6 @@ module Psych
458
428
  node = @emitter.start_mapping(nil, tag, false, Psych::Nodes::Mapping::BLOCK)
459
429
  register(o, node)
460
430
 
461
- # Dump the elements
462
- accept 'elements'
463
- @emitter.start_mapping nil, nil, true, Nodes::Mapping::BLOCK
464
- o.each do |k,v|
465
- accept k
466
- accept v
467
- end
468
- @emitter.end_mapping
469
-
470
431
  # Dump the ivars
471
432
  accept 'ivars'
472
433
  @emitter.start_mapping nil, nil, true, Nodes::Mapping::BLOCK
@@ -476,6 +437,15 @@ module Psych
476
437
  end
477
438
  @emitter.end_mapping
478
439
 
440
+ # Dump the elements
441
+ accept 'elements'
442
+ @emitter.start_mapping nil, nil, true, Nodes::Mapping::BLOCK
443
+ o.each do |k,v|
444
+ accept k
445
+ accept v
446
+ end
447
+ @emitter.end_mapping
448
+
479
449
  @emitter.end_mapping
480
450
  else
481
451
  tag = "!ruby/hash:#{o.class}"
@@ -492,6 +462,24 @@ module Psych
492
462
  def dump_list o
493
463
  end
494
464
 
465
+ def dump_exception o, msg
466
+ tag = ['!ruby/exception', o.class.name].join ':'
467
+
468
+ @emitter.start_mapping nil, tag, false, Nodes::Mapping::BLOCK
469
+
470
+ if msg
471
+ @emitter.scalar 'message', nil, nil, true, false, Nodes::Scalar::ANY
472
+ accept msg
473
+ end
474
+
475
+ @emitter.scalar 'backtrace', nil, nil, true, false, Nodes::Scalar::ANY
476
+ accept o.backtrace
477
+
478
+ dump_ivars o
479
+
480
+ @emitter.end_mapping
481
+ end
482
+
495
483
  def format_time time
496
484
  if time.utc?
497
485
  time.strftime("%Y-%m-%d %H:%M:%S.%9N Z")
@@ -1,14 +1,19 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  # frozen_string_literal: true
3
3
 
4
+ version_module = Module.new do
5
+ version_rb = File.join(__dir__, "lib/psych/versions.rb")
6
+ module_eval(File.read(version_rb), version_rb)
7
+ end
8
+
4
9
  Gem::Specification.new do |s|
5
10
  s.name = "psych"
6
- s.version = "3.0.3.pre2"
11
+ s.version = version_module::Psych::VERSION
7
12
  s.authors = ["Aaron Patterson", "SHIBATA Hiroshi", "Charles Oliver Nutter"]
8
13
  s.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org", "headius@headius.com"]
9
14
  s.summary = "Psych is a YAML parser and emitter"
10
15
  s.description = <<-DESCRIPTION
11
- Psych is a YAML parser and emitter. Psych leverages libyaml[http://pyyaml.org/wiki/LibYAML]
16
+ Psych is a YAML parser and emitter. Psych leverages libyaml[https://pyyaml.org/wiki/LibYAML]
12
17
  for its YAML parsing and emitting capabilities. In addition to wrapping libyaml,
13
18
  Psych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format.
14
19
  DESCRIPTION
@@ -18,7 +23,7 @@ DESCRIPTION
18
23
 
19
24
  # for ruby core repository. It was generated by `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
25
  s.files = [
21
- ".gitignore", ".travis.yml", "CHANGELOG.rdoc", "Gemfile", "Mavenfile", "README.md", "Rakefile", "bin/console",
26
+ ".gitignore", "Gemfile", "LICENSE", "Mavenfile", "README.md", "Rakefile", "bin/console",
22
27
  "bin/setup", "ext/psych/depend", "ext/psych/extconf.rb", "ext/psych/psych.c", "ext/psych/psych.h",
23
28
  "ext/psych/psych_emitter.c", "ext/psych/psych_emitter.h", "ext/psych/psych_parser.c", "ext/psych/psych_parser.h",
24
29
  "ext/psych/psych_to_ruby.c", "ext/psych/psych_to_ruby.h", "ext/psych/psych_yaml_tree.c", "ext/psych/psych_yaml_tree.h",
@@ -38,26 +43,26 @@ DESCRIPTION
38
43
  ]
39
44
 
40
45
  s.rdoc_options = ["--main", "README.md"]
41
- s.extra_rdoc_files = ["CHANGELOG.rdoc", "README.md"]
46
+ s.extra_rdoc_files = ["README.md"]
42
47
 
43
- s.required_ruby_version = Gem::Requirement.new(">= 2.2.2")
48
+ s.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
44
49
  s.rubygems_version = "2.5.1"
45
50
  s.required_rubygems_version = Gem::Requirement.new(">= 0")
46
51
 
47
- s.add_development_dependency 'rake-compiler', ">= 0.4.1"
48
- s.add_development_dependency 'minitest', "~> 5.0"
49
-
50
52
  if RUBY_ENGINE == 'jruby'
51
53
  s.platform = 'java'
52
54
  s.files.concat [
53
- "ext/java/PsychEmitter.java", "ext/java/PsychLibrary.java", "ext/java/PsychParser.java", "ext/java/PsychToRuby.java",
54
- "ext/java/PsychYamlTree.java", "lib/psych_jars.rb", "lib/psych.jar"
55
+ "ext/java/org/jruby/ext/psych/PsychEmitter.java",
56
+ "ext/java/org/jruby/ext/psych/PsychLibrary.java",
57
+ "ext/java/org/jruby/ext/psych/PsychParser.java",
58
+ "ext/java/org/jruby/ext/psych/PsychToRuby.java",
59
+ "ext/java/org/jruby/ext/psych/PsychYamlTree.java",
60
+ "lib/psych_jars.rb",
61
+ "lib/psych.jar"
55
62
  ]
56
- s.requirements = "jar org.yaml:snakeyaml, 1.23"
63
+ s.requirements = "jar org.yaml:snakeyaml, #{version_module::Psych::DEFAULT_SNAKEYAML_VERSION}"
57
64
  s.add_dependency 'jar-dependencies', '>= 0.1.7'
58
- s.add_development_dependency 'ruby-maven'
59
65
  else
60
66
  s.extensions = ["ext/psych/extconf.rb"]
61
- s.add_development_dependency 'rake-compiler-dock', ">= 0.6.1"
62
67
  end
63
68
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: psych
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3.pre2
4
+ version: 3.2.0
5
5
  platform: java
6
6
  authors:
7
7
  - Aaron Patterson
@@ -10,36 +10,8 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-09-28 00:00:00.000000000 Z
13
+ date: 2020-07-17 00:00:00.000000000 Z
14
14
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: 0.4.1
21
- name: rake-compiler
22
- prerelease: false
23
- type: :development
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- version: 0.4.1
29
- - !ruby/object:Gem::Dependency
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - "~>"
33
- - !ruby/object:Gem::Version
34
- version: '5.0'
35
- name: minitest
36
- prerelease: false
37
- type: :development
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - "~>"
41
- - !ruby/object:Gem::Version
42
- version: '5.0'
43
15
  - !ruby/object:Gem::Dependency
44
16
  requirement: !ruby/object:Gem::Requirement
45
17
  requirements:
@@ -47,29 +19,15 @@ dependencies:
47
19
  - !ruby/object:Gem::Version
48
20
  version: 0.1.7
49
21
  name: jar-dependencies
50
- prerelease: false
51
22
  type: :runtime
52
- version_requirements: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: 0.1.7
57
- - !ruby/object:Gem::Dependency
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- name: ruby-maven
64
23
  prerelease: false
65
- type: :development
66
24
  version_requirements: !ruby/object:Gem::Requirement
67
25
  requirements:
68
26
  - - ">="
69
27
  - !ruby/object:Gem::Version
70
- version: '0'
28
+ version: 0.1.7
71
29
  description: |
72
- Psych is a YAML parser and emitter. Psych leverages libyaml[http://pyyaml.org/wiki/LibYAML]
30
+ Psych is a YAML parser and emitter. Psych leverages libyaml[https://pyyaml.org/wiki/LibYAML]
73
31
  for its YAML parsing and emitting capabilities. In addition to wrapping libyaml,
74
32
  Psych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format.
75
33
  email:
@@ -79,23 +37,21 @@ email:
79
37
  executables: []
80
38
  extensions: []
81
39
  extra_rdoc_files:
82
- - CHANGELOG.rdoc
83
40
  - README.md
84
41
  files:
85
42
  - ".gitignore"
86
- - ".travis.yml"
87
- - CHANGELOG.rdoc
88
43
  - Gemfile
44
+ - LICENSE
89
45
  - Mavenfile
90
46
  - README.md
91
47
  - Rakefile
92
48
  - bin/console
93
49
  - bin/setup
94
- - ext/java/PsychEmitter.java
95
- - ext/java/PsychLibrary.java
96
- - ext/java/PsychParser.java
97
- - ext/java/PsychToRuby.java
98
- - ext/java/PsychYamlTree.java
50
+ - ext/java/org/jruby/ext/psych/PsychEmitter.java
51
+ - ext/java/org/jruby/ext/psych/PsychLibrary.java
52
+ - ext/java/org/jruby/ext/psych/PsychParser.java
53
+ - ext/java/org/jruby/ext/psych/PsychToRuby.java
54
+ - ext/java/org/jruby/ext/psych/PsychYamlTree.java
99
55
  - ext/psych/depend
100
56
  - ext/psych/extconf.rb
101
57
  - ext/psych/psych.c
@@ -174,16 +130,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
130
  requirements:
175
131
  - - ">="
176
132
  - !ruby/object:Gem::Version
177
- version: 2.2.2
133
+ version: 2.4.0
178
134
  required_rubygems_version: !ruby/object:Gem::Requirement
179
135
  requirements:
180
136
  - - ">="
181
137
  - !ruby/object:Gem::Version
182
138
  version: '0'
183
139
  requirements:
184
- - jar org.yaml:snakeyaml, 1.23
185
- rubyforge_project:
186
- rubygems_version: 2.7.6
140
+ - jar org.yaml:snakeyaml, 1.26
141
+ rubygems_version: 3.0.6
187
142
  signing_key:
188
143
  specification_version: 4
189
144
  summary: Psych is a YAML parser and emitter
@@ -1,20 +0,0 @@
1
- rvm:
2
- - 2.2.8
3
- - 2.3.5
4
- - 2.4.2
5
- - ruby-head
6
- - jruby-9.1.14.0
7
-
8
- matrix:
9
- allow_failures:
10
- - rvm: jruby-9.1.14.0
11
-
12
- before_script:
13
- - unset JRUBY_OPTS
14
-
15
- script: rake
16
-
17
- addons:
18
- apt:
19
- packages:
20
- - haveged
@@ -1,576 +0,0 @@
1
- Fri Feb 6 17:47:05 2015 Aaron Patterson <aaron@tenderlovemaking.com>
2
-
3
- * ext/psych/lib/psych/visitors/yaml_tree.rb: register nodes when
4
- dumping objects with custom coders. [ruby-core:66215] [Bug #10496]
5
-
6
- * test/psych/test_coder.rb: test for fix
7
-
8
- Fri Feb 6 16:58:31 2015 Aaron Patterson <aaron@tenderlovemaking.com>
9
-
10
- * ext/psych/lib/psych/visitors/to_ruby.rb: fix support for regular
11
- expressions with newlines. tenderlove/psych#222
12
-
13
- * test/psych/test_yaml.rb: test for change.
14
-
15
- Thu Jan 29 02:34:27 2015 Aaron Patterson <aaron@tenderlovemaking.com>
16
-
17
- * ext/psych/lib/psych/visitors/to_ruby.rb: fix parsing hashes with
18
- instance variables when it is referenced multiple times.
19
- * ext/psych/lib/psych.rb: bump version
20
- * ext/psych/psych.gemspec: bump version
21
- * test/psych/test_hash.rb: test for fix
22
-
23
- Fri Jan 9 07:13:55 2015 Aaron Patterson <aaron@tenderlovemaking.com>
24
-
25
- * ext/psych/lib/psych/visitors/to_ruby.rb: call `allocate` on hash
26
- subclasses. Fixes github.com/tenderlove/psych/issues/196
27
-
28
- * test/psych/test_hash.rb: test for change
29
-
30
- Fri Jan 9 06:58:43 2015 Aaron Patterson <aaron@tenderlovemaking.com>
31
-
32
- * ext/psych/lib/psych/visitors/to_ruby.rb: revive hashes with ivars
33
-
34
- * ext/psych/lib/psych/visitors/yaml_tree.rb: dump hashes with ivars.
35
- Fixes github.com/psych/issues/43
36
-
37
- * test/psych/test_hash.rb: test for change
38
-
39
- Sun Nov 23 13:11:24 2014 Sean Griffin <sean@thoughtbot.com>
40
-
41
- * lib/psych/visitors/to_ruby.rb: Allow loading any BasicObject that
42
- defines #marshal_load, fixes #100
43
- * lib/psych/visitors/yaml_tree.rb: Allow dumping any BasicObject that
44
- defines #marshal_dump
45
-
46
- Sat Aug 30 06:39:48 2014 Aaron Patterson <aaron@tenderlovemaking.com>
47
-
48
- * ext/psych/lib/psych/visitors/yaml_tree.rb: fix NameError dumping and
49
- loading. Fixes GH #85. Thanks @brentdax for the patch!
50
- * test/psych/test_exception.rb: test for fix
51
-
52
- Sat Aug 30 06:23:40 2014 Aaron Patterson <aaron@tenderlovemaking.com>
53
-
54
- * ext/psych/lib/psych/scalar_scanner.rb: fix loading strings that
55
- look like integers but have a newline. Fixes GH #189
56
- * test/psych/test_string.rb: test for fix
57
-
58
- Sat Aug 30 06:10:39 2014 Aaron Patterson <aaron@tenderlovemaking.com>
59
-
60
- * ext/psych/lib/psych/visitors/to_ruby.rb: merge keys with a hash
61
- should merge the hash in to the parent.
62
- * test/psych/test_merge_keys.rb: test for change. Fixes GH #202
63
-
64
- Sat Aug 30 06:00:26 2014 Aaron Patterson <aaron@tenderlovemaking.com>
65
-
66
- * ext/psych/lib/psych/visitors/to_ruby.rb: quoted "<<" strings
67
- should not be treated as merge keys.
68
- * ext/psych/lib/psych/visitors/yaml_tree.rb: hashes with keys
69
- containing "<<" should roundtrip.
70
- * test/psych/test_merge_keys.rb: test for change. Fixes GH #203
71
-
72
- Wed Aug 6 03:41:21 2014 Aaron Patterson <aaron@tenderlovemaking.com>
73
-
74
- * ext/psych/lib/psych/visitors/to_ruby.rb: backwards compatibility for
75
- hashes emitted by Syck. Github #198
76
- * test/psych/test_hash.rb: test for change.
77
-
78
- Fri Jun 6 07:41:41 2014 Aaron Patterson <aaron@tenderlovemaking.com>
79
-
80
- * ext/psych/lib/psych/visitors/yaml_tree.rb: dump empty symbols with a
81
- tag so that they can be parsed on input. [Bug #9873] [ruby-core:62825]
82
- * test/psych/test_symbol.rb: test for change
83
-
84
- Sun May 25 11:35:41 2014 Zachary Scott <e@zzak.io>
85
-
86
- * test/psych/*: YAML::ENGINE was removed in [Bug #8344]
87
-
88
- 2014-03-27 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
89
-
90
- * ext/psych/yaml/scanner.c: merge libyaml 0.1.6
91
- * ext/psych/yaml/yaml_private.h: ditto
92
-
93
- Sat Mar 1 11:08:00 2014 Aaron Patterson <aaron@tenderlovemaking.com>
94
-
95
- * ext/psych/lib/psych/visitors/yaml_tree.rb: support dumping Encoding
96
- objects.
97
-
98
- * ext/psych/lib/psych/visitors/to_ruby.rb: support loading Encoding
99
- objects.
100
-
101
- * test/psych/test_encoding.rb: add test
102
-
103
- * ext/psych/lib/psych.rb: add version
104
-
105
- Wed Feb 5 10:11:36 2014 Zachary Scott <e@zzak.io>
106
-
107
- * ext/psych/yaml/config.h: bump libyaml to 0.1.5
108
-
109
- Wed Feb 5 04:16:41 2014 Aaron Patterson <aaron@tenderlovemaking.com>
110
-
111
- * ext/psych/yaml/emitter.c: merge libyaml 0.1.5
112
- * ext/psych/yaml/loader.c: ditto
113
- * ext/psych/yaml/parser.c: ditto
114
- * ext/psych/yaml/reader.c: ditto
115
- * ext/psych/yaml/scanner.c: ditto
116
- * ext/psych/yaml/writer.c: ditto
117
- * ext/psych/yaml/yaml_private.h: ditto
118
-
119
- Thu Jan 9 09:55:20 2014 Aaron Patterson <aaron@tenderlovemaking.com>
120
-
121
- * ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings with
122
- quotes should not have changed. [ruby-core:59316] [Bug #9300]
123
-
124
- * ext/psych/lib/psych.rb: fixed missing require.
125
-
126
- * test/psych/test_string.rb: test
127
-
128
- Wed Nov 27 06:40:18 2013 Aaron Patterson <aaron@tenderlovemaking.com>
129
-
130
- * ext/psych/lib/psych/scalar_scanner.rb: fix support for negative
131
- years.
132
- * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
133
- * test/psych/test_date_time.rb: test for change.
134
- Fixes: https://github.com/tenderlove/psych/issues/168
135
-
136
- Wed Nov 27 04:46:55 2013 Aaron Patterson <aaron@tenderlovemaking.com>
137
-
138
- * ext/psych/lib/psych/scalar_scanner.rb: fix regexp for matching TIME
139
- strings.
140
- * test/psych/test_date_time.rb: test for change.
141
- Fixes: https://github.com/tenderlove/psych/issues/171
142
-
143
- Wed Nov 6 04:14:25 2013 Aaron Patterson <aaron@tenderlovemaking.com>
144
-
145
- * ext/psych/lib/psych/visitors/to_ruby.rb: process merge keys before
146
- reviving objects. Fixes GH psych #168
147
- * test/psych/test_merge_keys.rb: test for change
148
- https://github.com/tenderlove/psych/issues/168
149
-
150
- Wed Oct 30 03:25:10 2013 Aaron Patterson <aaron@tenderlovemaking.com>
151
-
152
- * ext/psych/lib/psych/visitors/yaml_tree.rb: make less garbage when
153
- testing if a string is binary.
154
-
155
- Wed Oct 30 03:08:24 2013 Aaron Patterson <aaron@tenderlovemaking.com>
156
-
157
- * ext/psych/lib/psych/visitors/yaml_tree.rb: string subclasses should
158
- not be considered to be binary. Fixes Psych / GH 166
159
- https://github.com/tenderlove/psych/issues/166
160
-
161
- * test/psych/test_string.rb: test for fix
162
-
163
- Fri Sep 20 23:44:07 2013 Zachary Scott <e@zzak.io>
164
-
165
- * ext/psych/yaml/yaml.h: [DOC] fix typo by @GreenGeorge [Fixes GH-161]
166
- https://github.com/tenderlove/psych/pull/161
167
-
168
- Fri Sep 6 02:37:22 2013 Aaron Patterson <aaron@tenderlovemaking.com>
169
-
170
- * ext/psych/lib/psych/visitors/yaml_tree.rb: use double quotes when
171
- strings start with special characters.
172
- [Fixes GH-157] https://github.com/tenderlove/psych/issues/157
173
-
174
- * test/psych/test_string.rb: test for change.
175
-
176
- Thu Aug 29 02:40:45 2013 Aaron Patterson <aaron@tenderlovemaking.com>
177
-
178
- * ext/psych/lib/psych/scalar_scanner.rb: invalid floats should be
179
- treated as strings.
180
- [Fixes GH-156] https://github.com/tenderlove/psych/issues/156
181
-
182
- * test/psych/test_string.rb: test for change
183
-
184
- Sat Jul 6 04:49:38 2013 Aaron Patterson <aaron@tenderlovemaking.com>
185
-
186
- * ext/psych/lib/psych/visitors/yaml_tree.rb: register time objects so
187
- they are referenced as ids during output.
188
- * test/psych/test_date_time.rb: corresponding test.
189
-
190
- Wed May 15 02:22:16 2013 Aaron Patterson <aaron@tenderlovemaking.com>
191
-
192
- * ext/psych/lib/psych.rb: Adding Psych.safe_load for loading a user
193
- defined, restricted subset of Ruby object types.
194
- * ext/psych/lib/psych/class_loader.rb: A class loader for
195
- encapsulating the logic for which objects are allowed to be
196
- deserialized.
197
- * ext/psych/lib/psych/deprecated.rb: Changes to use the class loader
198
- * ext/psych/lib/psych/exception.rb: ditto
199
- * ext/psych/lib/psych/json/stream.rb: ditto
200
- * ext/psych/lib/psych/nodes/node.rb: ditto
201
- * ext/psych/lib/psych/scalar_scanner.rb: ditto
202
- * ext/psych/lib/psych/stream.rb: ditto
203
- * ext/psych/lib/psych/streaming.rb: ditto
204
- * ext/psych/lib/psych/visitors/json_tree.rb: ditto
205
- * ext/psych/lib/psych/visitors/to_ruby.rb: ditto
206
- * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
207
- * ext/psych/psych_to_ruby.c: ditto
208
- * test/psych/helper.rb: ditto
209
- * test/psych/test_safe_load.rb: tests for restricted subset.
210
- * test/psych/test_scalar_scanner.rb: ditto
211
- * test/psych/visitors/test_to_ruby.rb: ditto
212
- * test/psych/visitors/test_yaml_tree.rb: ditto
213
-
214
- Sat Apr 6 02:54:08 2013 Aaron Patterson <aaron@tenderlovemaking.com>
215
-
216
- * ext/psych/lib/psych/exception.rb: there should be only one exception
217
- base class. Fixes tenderlove/psych #125
218
- * ext/psych/lib/psych.rb: require the correct exception class
219
- * ext/psych/lib/psych/syntax_error.rb: ditto
220
- * ext/psych/lib/psych/visitors/to_ruby.rb: ditto
221
-
222
- Sat Apr 6 02:06:04 2013 Aaron Patterson <aaron@tenderlovemaking.com>
223
-
224
- * ext/psych/lib/psych/visitors/to_ruby.rb: correctly register
225
- self-referential strings. Fixes tenderlove/psych #135
226
-
227
- * test/psych/test_string.rb: appropriate test.
228
-
229
- Fri Mar 1 09:15:00 2013 Zachary Scott <zachary@zacharyscott.net>
230
-
231
- * lib/psych.rb: specify in rdoc what object is returned in parser
232
- By Adam Stankiewicz [Github Fixes #133]
233
-
234
- Fri Mar 1 03:22:00 2013 Zachary Scott <zachary@zacharyscott.net>
235
-
236
- * lib/psych.rb: rdoc for Psych overview by Adam Stankiewicz
237
- [Github Fixes #134]
238
-
239
- Sun Feb 17 01:13:00 2013 Zachary Scott <zachary@zacharyscott.net>
240
-
241
- * lib/psych/y.rb: Document Kernel#y by Adam Stankiewicz
242
- [Github Fixes #127]
243
-
244
- Fri Feb 8 08:53:27 2013 Aaron Patterson <aaron@tenderlovemaking.com>
245
-
246
- * ext/psych/lib/psych/visitors/yaml_tree.rb: fixing string quotation
247
- when dumping Ruby strings. Thanks Ingy
248
-
249
- * test/psych/test_psych.rb: appropriate tests.
250
-
251
- * test/psych/test_yaml.rb: ditto
252
-
253
- Fri Feb 8 08:50:42 2013 Aaron Patterson <aaron@tenderlovemaking.com>
254
-
255
- * ext/psych/lib/psych/visitors/yaml_tree.rb: change output reference
256
- ids to be sequential numbers.
257
-
258
- Thu Jan 17 10:48:56 2013 Aaron Patterson <aaron@tenderlovemaking.com>
259
-
260
- * ext/psych/lib/psych/scalar_scanner.rb: use constants rather than
261
- calculating Inf and NaN.
262
-
263
- Sun Jan 13 16:40:00 2013 Zachary Scott <zachary@zacharyscott.net>
264
-
265
- * ext/psych/yaml/scanner.c: Typos by James Dabbs [Github Fixes #118]
266
-
267
- Sat Jan 12 08:58:47 2013 Aaron Patterson <aaron@tenderlovemaking.com>
268
-
269
- * ext/psych/lib/psych/visitors/to_ruby.rb: merge key values that
270
- contain something besides a hash should be left in tact.
271
-
272
- * test/psych/test_merge_keys.rb: test for change
273
-
274
- Thu Jan 10 04:23:07 2013 Aaron Patterson <aaron@tenderlovemaking.com>
275
-
276
- * ext/psych/lib/psych/scalar_scanner.rb: strip trailing dots from
277
- floats so that Float() will not raise an exception.
278
-
279
- * test/psych/test_numeric.rb: test to ensure "1." can be loaded
280
-
281
- * test/psych/test_string.rb: make sure "1." can round trip
282
-
283
- Sat Nov 17 12:03:41 2012 Aaron Patterson <aaron@tenderlovemaking.com>
284
-
285
- * ext/psych/lib/psych/scalar_scanner.rb: avoid raising exceptions when
286
- parsing Floats and Integers. Thanks riffraff [ruby-core:44426]
287
- * test/psych/test_numeric.rb: associated test
288
-
289
- Sat Nov 17 11:26:36 2012 Aaron Patterson <aaron@tenderlovemaking.com>
290
-
291
- * ext/psych/lib/psych/core_ext.rb: move Kernel#y so that it can
292
- manually be required as 'psych/y'.
293
-
294
- * ext/psych/lib/psych/y.rb: ditto
295
-
296
- Tue Nov 6 09:37:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
297
-
298
- * ruby.c (load_file_internal): set default source encoding as
299
- UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679]
300
-
301
- * parse.y (parser_initialize): set default parser encoding as
302
- UTF-8 instead of US-ASCII.
303
-
304
- Mon Oct 29 10:22:00 2012 Aaron Patterson <aaron@tenderlovemaking.com>
305
-
306
- * ext/psych/lib/psych/handlers/recorder.rb: added a class for
307
- recording YAML parse and emit events.
308
-
309
- * ext/psych/lib/psych/handler.rb: adding a list of events so that
310
- handler classes can more easily be meta-programmed.
311
-
312
- * test/psych/handlers/test_recorder.rb: tests for the change.
313
-
314
- Sun Oct 28 10:12:15 2012 Aaron Patterson <aaron@tenderlovemaking.com>
315
-
316
- * ext/psych/lib/psych/visitors/yaml_tree.rb: `tree` should return the
317
- same thing on every call.
318
-
319
- * test/psych/visitors/test_yaml_tree.rb: related test.
320
-
321
- Sun Oct 28 10:05:03 2012 Aaron Patterson <aaron@tenderlovemaking.com>
322
-
323
- * ext/psych/lib/psych/visitors/yaml_tree.rb: YAML Tree object should
324
- be able to take an emitter object as it's output.
325
-
326
- * test/psych/visitors/test_yaml_tree.rb: related test.
327
-
328
- Thu Jul 19 09:33:46 2012 Aaron Patterson <aaron@tenderlovemaking.com>
329
-
330
- * ext/psych/emitter.c (initialize): allow a configuration object to be
331
- passed to the constructor so that mutation isn't required after
332
- instantiation.
333
-
334
- * ext/psych/lib/psych/handler.rb: add configuration object
335
-
336
- * ext/psych/lib/psych/visitors/emitter.rb: use configuration object if
337
- extra configuration is present.
338
-
339
- Fri May 18 01:28:21 2012 Aaron Patterson <aaron@tenderlovemaking.com>
340
-
341
- * ext/psych/parser.c (transcode_string): fix encoding index names.
342
- Thanks markizko for reporting.
343
-
344
- Wed May 16 05:11:29 2012 Aaron Patterson <aaron@tenderlovemaking.com>
345
-
346
- * ext/psych/lib/psych/visitors/to_ruby.rb: fix a bug with string
347
- subclass dumping and loading.
348
-
349
- * test/psych/test_array.rb: pertinent tests
350
-
351
- * test/psych/test_string.rb: ditto
352
-
353
- Wed May 16 01:31:21 2012 Aaron Patterson <aaron@tenderlovemaking.com>
354
-
355
- * ext/psych/lib/psych/visitors/to_ruby.rb: convert omap tagged maps to
356
- Psych::Omap objects rather than hashes. [Bug #6425]
357
-
358
- * test/psych/test_omap.rb: pertinent test.
359
-
360
- Wed May 16 01:15:45 2012 Aaron Patterson <aaron@tenderlovemaking.com>
361
-
362
- * ext/psych/lib/psych/visitors/yaml_tree.rb: keep a reference to
363
- custom coders so that GC does not impact dumped yaml reference ids.
364
-
365
- Mon Apr 30 04:43:53 2012 Aaron Patterson <aaron@tenderlovemaking.com>
366
-
367
- * ext/psych/lib/psych/json/yaml_events.rb: implicit styles should not
368
- be changeable for JSON events.
369
-
370
- Sat Apr 7 02:07:00 2012 Aaron Patterson <aaron@tenderlovemaking.com>
371
-
372
- * ext/psych/parser.c: fall back to any encoding if the external
373
- encoding is wrong. [ruby-core:44163]
374
- * test/psych/test_encoding.rb: fix test
375
-
376
- Fri Mar 9 06:29:22 2012 Aaron Patterson <aaron@tenderlovemaking.com>
377
-
378
- * ext/psych/lib/psych.rb (load, parse): stop parsing or loading after
379
- the first document has been parsed.
380
-
381
- * test/psych/test_stream.rb: pertinent tests.
382
-
383
- Fri Mar 9 06:17:05 2012 Aaron Patterson <aaron@tenderlovemaking.com>
384
-
385
- * ext/psych/lib/psych.rb (parse_stream, load_stream): if a block is
386
- given, documents will be yielded to the block as they are parsed.
387
- [ruby-core:42404] [Bug #5978]
388
-
389
- * ext/psych/lib/psych/handlers/document_stream.rb: add a handler that
390
- yields documents as they are parsed
391
-
392
- * test/psych/test_stream.rb: corresponding tests.
393
-
394
- Tue Mar 6 02:31:20 2012 Aaron Patterson <aaron@tenderlovemaking.com>
395
-
396
- * ext/psych/lib/psych/core_ext.rb: only extend Kernel if IRB is loaded
397
- in order to stop method pollution.
398
-
399
- Tue Feb 28 10:28:51 2012 Aaron Patterson <aaron@tenderlovemaking.com>
400
-
401
- * ext/psych/lib/psych.rb: default open YAML files with utf8 external
402
- encoding. [ruby-core:42967]
403
- * test/psych/test_tainted.rb: ditto
404
-
405
- Fri Feb 24 13:54:33 2012 Aaron Patterson <aaron@tenderlovemaking.com>
406
-
407
- * ext/psych/parser.c: prevent a memory leak by protecting calls to
408
- handler callbacks.
409
- * test/psych/test_parser.rb: test to demonstrate leak.
410
-
411
- Fri Feb 24 08:08:38 2012 Aaron Patterson <aaron@tenderlovemaking.com>
412
-
413
- * ext/psych/parser.c: set parser encoding based on the YAML input
414
- rather than user configuration.
415
- * test/psych/test_encoding.rb: corresponding tests.
416
- * test/psych/test_parser.rb: ditto
417
- * test/psych/test_tainted.rb: ditto
418
-
419
- Fri Feb 10 03:41:31 2012 Aaron Patterson <aaron@tenderlovemaking.com>
420
-
421
- * ext/psych/parser.c: removed external encoding setter, allow parser
422
- to be reused.
423
- * ext/psych/lib/psych/parser.rb: added external encoding setter.
424
- * test/psych/test_parser.rb: test parser reuse
425
-
426
- Wed Jan 18 12:49:15 2012 Aaron Patterson <aaron@tenderlovemaking.com>
427
-
428
- * ext/psych/lib/psych/visitors/to_ruby.rb: Added support for loading
429
- subclasses of String with ivars
430
- * ext/psych/lib/psych/visitors/yaml_tree.rb: Added support for dumping
431
- subclasses of String with ivars
432
- * test/psych/test_string.rb: corresponding tests
433
-
434
- Sun Dec 18 12:42:48 2011 Aaron Patterson <aaron@tenderlovemaking.com>
435
-
436
- * ext/psych/lib/psych/visitors/to_ruby.rb: BigDecimals can be restored
437
- from YAML.
438
- * ext/psych/lib/psych/visitors/yaml_tree.rb: BigDecimals can be dumped
439
- to YAML.
440
- * test/psych/test_numeric.rb: tests for BigDecimal serialization
441
-
442
- Sun Dec 18 12:03:13 2011 Aaron Patterson <aaron@tenderlovemaking.com>
443
-
444
- * ext/psych/lib/psych/scalar_scanner.rb: Strings that look like dates
445
- should be treated as strings and not dates.
446
-
447
- * test/psych/test_scalar_scanner.rb: corresponding tests.
448
-
449
- Wed Dec 7 08:04:31 2011 Aaron Patterson <aaron@tenderlovemaking.com>
450
-
451
- * ext/psych/lib/psych.rb (module Psych): parse and load methods take
452
- an optional file name that is used when raising Psych::SyntaxError
453
- exceptions
454
- * ext/psych/lib/psych/syntax_error.rb (module Psych): allow nil file
455
- names and handle nil file names in the exception message
456
- * test/psych/test_exception.rb (module Psych): Tests for changes.
457
-
458
- Wed Nov 30 09:09:37 2011 Aaron Patterson <aaron@tenderlovemaking.com>
459
-
460
- * ext/psych/parser.c (parse): parse method can take an option file
461
- name for use in exception messages.
462
- * test/psych/test_parser.rb: corresponding tests.
463
-
464
- Tue Nov 22 04:46:22 2011 Aaron Patterson <aaron@tenderlovemaking.com>
465
-
466
- * ext/psych/lib/psych.rb: remove autoload from psych
467
- * ext/psych/lib/psych/json.rb: ditto
468
-
469
- Thu Nov 17 10:36:46 2011 Aaron Patterson <aaron@tenderlovemaking.com>
470
-
471
- * ext/psych/lib/psych.rb (load_file): make sure opened yaml files are
472
- also closed. [ruby-core:41088]
473
-
474
- Wed Nov 9 04:52:16 2011 Aaron Patterson <aaron@tenderlovemaking.com>
475
-
476
- * ext/psych/lib/psych/tree_builder.rb: dump complex numbers,
477
- rationals, etc with reference ids.
478
- * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
479
- * ext/psych/lib/psych/visitors/to_ruby.rb: loading complex numbers,
480
- rationals, etc with reference ids.
481
- * test/psych/test_object_references.rb: corresponding tests
482
-
483
- Mon Nov 7 20:31:52 2011 Aaron Patterson <aaron@tenderlovemaking.com>
484
-
485
- * ext/psych/lib/psych/scalar_scanner.rb: make sure strings that look
486
- like base 60 numbers are serialized as quoted strings.
487
- * test/psych/test_string.rb: test for change.
488
-
489
- Wed Oct 5 02:50:27 2011 Aaron Patterson <aaron@tenderlovemaking.com>
490
-
491
- * ext/psych/lib/psych/syntax_error.rb: Add file, line, offset, and
492
- message attributes during parse failure.
493
- * ext/psych/parser.c: Update parser to raise exception with correct
494
- values.
495
- * test/psych/test_exception.rb: corresponding tests.
496
-
497
- Wed Oct 5 01:52:16 2011 Aaron Patterson <aaron@tenderlovemaking.com>
498
-
499
- * ext/psych/parser.c (parse): Use context_mark for indicating error
500
- line and column.
501
-
502
- Tue Oct 4 06:29:55 2011 Aaron Patterson <aaron@tenderlovemaking.com>
503
-
504
- * ext/psych/lib/psych.rb: calling `yaml` rather than `to_yaml`.
505
- * ext/psych/lib/psych/nodes/node.rb: Rename `to_yaml` to just `yaml`
506
- in order to avoid YAML::ENGINE switching from replacing this method.
507
- * test/psych/helper.rb: fix tests for method name change.
508
- * test/psych/test_document.rb: ditto
509
- * test/psych/visitors/test_emitter.rb: ditto
510
-
511
- Tue Oct 4 06:20:19 2011 Aaron Patterson <aaron@tenderlovemaking.com>
512
-
513
- * ext/psych/lib/psych/scalar_scanner.rb: Match values against the
514
- floating point spec defined in YAML to avoid erronious parses.
515
- * test/psych/test_numeric.rb: corresponding test.
516
-
517
- Tue Oct 4 05:59:24 2011 Aaron Patterson <aaron@tenderlovemaking.com>
518
-
519
- * ext/psych/lib/psych/visitors/to_ruby.rb: ToRuby visitor can be
520
- constructed with a ScalarScanner.
521
- * ext/psych/lib/psych/visitors/yaml_tree.rb: ScalarScanner can be
522
- passed to the YAMLTree visitor.
523
-
524
- Tue Oct 4 05:47:23 2011 Aaron Patterson <aaron@tenderlovemaking.com>
525
-
526
- * ext/psych/lib/psych/visitors/to_ruby.rb: Define Regexp::NOENCODING
527
- for 1.9.2 backwards compatibility.
528
- * ext/psych/lib/psych/visitors/yaml_tree.rb: Fix Date string
529
- generation for 1.9.2 backwards compatibility.
530
-
531
- Fri Sep 2 04:05:25 2011 Aaron Patterson <aaron@tenderlovemaking.com>
532
-
533
- * ext/psych/lib/psych/visitors/yaml_tree.rb: emit strings tagged as
534
- ascii-8bit as binary in YAML.
535
- * test/psych/test_string.rb: corresponding test.
536
-
537
- Thu Aug 25 06:11:35 2011 Aaron Patterson <aaron@tenderlovemaking.com>
538
-
539
- * ext/psych/lib/psych/nodes/node.rb: default `to_yaml` encoding to be
540
- UTF-8.
541
- * test/psych/test_encoding.rb: test yaml dump encoding.
542
-
543
- Wed Jun 22 03:20:52 2011 Aaron Patterson <aaron@tenderlovemaking.com>
544
-
545
- * ext/psych/lib/psych/visitors/to_ruby.rb: Fix cyclic references of
546
- objects. Thanks to CvX for reporting the bug and a test case.
547
- * test/psych/test_object.rb: test for cyclic object references.
548
-
549
- Thu Jun 9 10:57:03 2011 Aaron Patterson <aaron@tenderlovemaking.com>
550
-
551
- * ext/psych/lib/psych/visitors/to_ruby.rb: Hash subclasses can be read
552
- from YAML files.
553
- * ext/psych/lib/psych/visitors/yaml_tree.rb: Hash subclasses can be
554
- dumped to YAML files.
555
- * test/psych/test_hash.rb: corresponding test.
556
-
557
- Thu Jun 9 09:18:51 2011 Aaron Patterson <aaron@tenderlovemaking.com>
558
-
559
- * ext/psych/lib/psych/visitors/to_ruby.rb: Ruby modules can be loaded
560
- from YAML files.
561
- * ext/psych/lib/psych/visitors/yaml_tree.rb: Ruby modules can be
562
- dumped to YAML files.
563
- * test/psych/test_class.rb: corresponding test.
564
-
565
- Thu Jun 9 09:05:04 2011 Aaron Patterson <aaron@tenderlovemaking.com>
566
-
567
- * ext/psych/lib/psych/visitors/to_ruby.rb: Ruby classes can be loaded
568
- from YAML files.
569
- * ext/psych/lib/psych/visitors/yaml_tree.rb: Ruby classes can be
570
- dumped to YAML files.
571
- * test/psych/test_class.rb: corresponding test.
572
-
573
- Mon Jun 6 09:39:43 2011 Aaron Patterson <aaron@tenderlovemaking.com>
574
-
575
- * ext/psych/parser.c (parse): release event objects to plug memory
576
- leak. Thanks Mark J. Titorenko!