psych 3.3.1-java → 3.3.2-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5b639869782169459319acb664ad1e578b9b34a895d92f9a21b15b61aa5b105
4
- data.tar.gz: 45ce044b1b49c3c192aa4650de49e632421b83a83704afa72f9b9d7f0f294876
3
+ metadata.gz: 3f502010ef57ab680b8a273b17cb0c7bcf38cd9e3c9f4885323c8817933bbf7b
4
+ data.tar.gz: 2be8f458c94bf961bb3c9681ced9ea2e00e67095e9ce0f4e062111a0b1e6bbaa
5
5
  SHA512:
6
- metadata.gz: 3ebd264e253a5b951c128a9c6e1ab8730eca2f195ab3be0903bc1748a72523258b8e1217d5ceffbdb6915a17a66995f2a6d031139ee3a633219d5899f8409226
7
- data.tar.gz: 77c74f09ff5fc3723ed93a3382de206b66af3612530dd886b6720df2862e24e92713926bba67f8d72cc03bf0b6c235939166d26de63644c93fbaa49fdeb848c3
6
+ metadata.gz: 4af84db27ecb5c12a92c8f80b6078a639e75f11ce0284b68e57e4906e62893ffd7cfe77780e6729374d760e136b61c70709050c8aebce345b373ea3fbfd00f77
7
+ data.tar.gz: afcf7ee1fac4892db0789448761d325d951904423d914e579a1b51740ae3bdb0c5de9b20590b11ed88aa56c03fff25bb16623b7771c45e9957dc8e07b716d81a
data/Gemfile CHANGED
@@ -4,6 +4,6 @@ gemspec
4
4
 
5
5
  group :development do
6
6
  gem 'rake-compiler', ">= 0.4.1"
7
- gem 'minitest', "~> 5.0"
7
+ gem 'test-unit'
8
8
  gem 'ruby-maven', :platforms => :jruby
9
9
  end
data/Rakefile CHANGED
@@ -3,8 +3,8 @@ Bundler::GemHelper.install_tasks
3
3
 
4
4
  require "rake/testtask"
5
5
  Rake::TestTask.new(:test) do |t|
6
- t.libs << "test"
7
- t.libs << "lib"
6
+ t.libs << "test/lib" << "test"
7
+ t.ruby_opts << "-rhelper"
8
8
  t.test_files = FileList['test/**/test_*.rb']
9
9
  t.verbose = true
10
10
  t.warning = true
@@ -31,4 +31,11 @@ else
31
31
  Rake::ExtensionTask.new("psych")
32
32
  end
33
33
 
34
+ task :sync_tool do
35
+ require 'fileutils'
36
+ FileUtils.cp "../ruby/tool/lib/test/unit/core_assertions.rb", "./test/lib"
37
+ FileUtils.cp "../ruby/tool/lib/envutil.rb", "./test/lib"
38
+ FileUtils.cp "../ruby/tool/lib/find_executable.rb", "./test/lib"
39
+ end
40
+
34
41
  task :default => [:compile, :test]
@@ -541,4 +541,4 @@ yaml_parser_load_mapping_end(yaml_parser_t *parser, yaml_event_t *event,
541
541
  (void)POP(parser, *ctx);
542
542
 
543
543
  return 1;
544
- }
544
+ }
@@ -273,7 +273,7 @@
273
273
  * The tokens BLOCK-SEQUENCE-START and BLOCK-MAPPING-START denote indentation
274
274
  * increase that precedes a block collection (cf. the INDENT token in Python).
275
275
  * The token BLOCK-END denote indentation decrease that ends a block collection
276
- * (cf. the DEDENT token in Python). However YAML has some syntax pecularities
276
+ * (cf. the DEDENT token in Python). However YAML has some syntax peculiarities
277
277
  * that makes detections of these tokens more complex.
278
278
  *
279
279
  * The tokens BLOCK-ENTRY, KEY, and VALUE are used to represent the indicators
@@ -3287,7 +3287,7 @@ yaml_parser_scan_flow_scalar(yaml_parser_t *parser, yaml_token_t *token,
3287
3287
 
3288
3288
  /* Check if we are at the end of the scalar. */
3289
3289
 
3290
- /* Fix for crash unitialized value crash
3290
+ /* Fix for crash uninitialized value crash
3291
3291
  * Credit for the bug and input is to OSS Fuzz
3292
3292
  * Credit for the fix to Alex Gaynor
3293
3293
  */
@@ -1095,7 +1095,7 @@ typedef struct yaml_parser_s {
1095
1095
  yaml_error_type_t error;
1096
1096
  /** Error description. */
1097
1097
  const char *problem;
1098
- /** The byte about which the problem occured. */
1098
+ /** The byte about which the problem occurred. */
1099
1099
  size_t problem_offset;
1100
1100
  /** The problematic value (@c -1 is none). */
1101
1101
  int problem_value;
@@ -1335,7 +1335,7 @@ yaml_parser_delete(yaml_parser_t *parser);
1335
1335
  * Set a string input.
1336
1336
  *
1337
1337
  * Note that the @a input pointer must be valid while the @a parser object
1338
- * exists. The application is responsible for destroing @a input after
1338
+ * exists. The application is responsible for destroying @a input after
1339
1339
  * destroying the @a parser.
1340
1340
  *
1341
1341
  * @param[in,out] parser A parser object.
@@ -1950,7 +1950,7 @@ yaml_emitter_close(yaml_emitter_t *emitter);
1950
1950
  /**
1951
1951
  * Emit a YAML document.
1952
1952
  *
1953
- * The documen object may be generated using the yaml_parser_load() function
1953
+ * The document object may be generated using the yaml_parser_load() function
1954
1954
  * or the yaml_document_initialize() function. The emitter takes the
1955
1955
  * responsibility for the document object and destroys its content after
1956
1956
  * it is emitted. The document object is destroyed even if the function fails.
@@ -2,7 +2,7 @@
2
2
  #include RUBY_EXTCONF_H
3
3
  #endif
4
4
 
5
- #if HAVE_CONFIG_H
5
+ #ifdef HAVE_CONFIG_H
6
6
  #include "config.h"
7
7
  #endif
8
8
 
data/lib/psych.rb CHANGED
@@ -271,7 +271,7 @@ module Psych
271
271
  # YAML documents that are supplied via user input. Instead, please use the
272
272
  # safe_load method.
273
273
  #
274
- def self.load yaml, legacy_filename = NOT_GIVEN, filename: nil, fallback: false, symbolize_names: false, freeze: false
274
+ def self.unsafe_load yaml, legacy_filename = NOT_GIVEN, filename: nil, fallback: false, symbolize_names: false, freeze: false
275
275
  if legacy_filename != NOT_GIVEN
276
276
  warn_with_uplevel 'Passing filename with the 2nd argument of Psych.load is deprecated. Use keyword argument like Psych.load(yaml, filename: ...) instead.', uplevel: 1 if $VERBOSE
277
277
  filename = legacy_filename
@@ -281,6 +281,7 @@ module Psych
281
281
  return fallback unless result
282
282
  result.to_ruby(symbolize_names: symbolize_names, freeze: freeze)
283
283
  end
284
+ class << self; alias :load :unsafe_load; end
284
285
 
285
286
  ###
286
287
  # Safely load the yaml string in +yaml+. By default, only the following
@@ -577,11 +578,12 @@ module Psych
577
578
  # NOTE: This method *should not* be used to parse untrusted documents, such as
578
579
  # YAML documents that are supplied via user input. Instead, please use the
579
580
  # safe_load_file method.
580
- def self.load_file filename, **kwargs
581
+ def self.unsafe_load_file filename, **kwargs
581
582
  File.open(filename, 'r:bom|utf-8') { |f|
582
- self.load f, filename: filename, **kwargs
583
+ self.unsafe_load f, filename: filename, **kwargs
583
584
  }
584
585
  end
586
+ class << self; alias :load_file :unsafe_load_file; end
585
587
 
586
588
  ###
587
589
  # Safely loads the document contained in +filename+. Returns the yaml contained in
data/lib/psych/handler.rb CHANGED
@@ -119,7 +119,7 @@ module Psych
119
119
  # +tag+ is an associated tag or nil
120
120
  # +plain+ is a boolean value
121
121
  # +quoted+ is a boolean value
122
- # +style+ is an integer idicating the string style
122
+ # +style+ is an integer indicating the string style
123
123
  #
124
124
  # See the constants in Psych::Nodes::Scalar for the possible values of
125
125
  # +style+
@@ -50,7 +50,7 @@ module Psych
50
50
  # +tag+ is an associated tag or nil
51
51
  # +plain+ is a boolean value
52
52
  # +quoted+ is a boolean value
53
- # +style+ is an integer idicating the string style
53
+ # +style+ is an integer indicating the string style
54
54
  #
55
55
  # == See Also
56
56
  #
@@ -1,8 +1,8 @@
1
-
2
1
  # frozen_string_literal: true
2
+
3
3
  module Psych
4
4
  # The version of Psych you are using
5
- VERSION = '3.3.1'
5
+ VERSION = '3.3.2'
6
6
 
7
7
  if RUBY_ENGINE == 'jruby'
8
8
  DEFAULT_SNAKEYAML_VERSION = '1.28'.freeze
@@ -366,7 +366,7 @@ module Psych
366
366
  hash[key] = val
367
367
  end
368
368
  else
369
- if !tagged && @symbolize_names
369
+ if !tagged && @symbolize_names && key.is_a?(String)
370
370
  key = key.to_sym
371
371
  elsif !@freeze
372
372
  key = deduplicate(key)
@@ -509,9 +509,9 @@ module Psych
509
509
  def emit_coder c, o
510
510
  case c.type
511
511
  when :scalar
512
- @emitter.scalar c.scalar, nil, c.tag, c.tag.nil?, false, Nodes::Scalar::ANY
512
+ @emitter.scalar c.scalar, nil, c.tag, c.tag.nil?, false, c.style
513
513
  when :seq
514
- @emitter.start_sequence nil, c.tag, c.tag.nil?, Nodes::Sequence::BLOCK
514
+ @emitter.start_sequence nil, c.tag, c.tag.nil?, c.style
515
515
  c.seq.each do |thing|
516
516
  accept thing
517
517
  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.3.1
4
+ version: 3.3.2
5
5
  platform: java
6
6
  authors:
7
7
  - Aaron Patterson
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-02-24 00:00:00.000000000 Z
13
+ date: 2021-05-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  requirement: !ruby/object:Gem::Requirement