Граф коммитов

173 Коммитов

Автор SHA1 Сообщение Дата
tenderlove f595568e47 * ext/psych/lib/psych.rb: bump psych version.
* ext/psych/psych.gemspec: ditto
* ext/psych/yaml/scanner.c: add latest libyaml change.
* test/psych/helper.rb: support newer minitest
* test/psych/test_to_yaml_properties.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17 18:17:46 +00:00
tenderlove ecbf835180 * ext/psych/lib/psych/visitors/yaml_tree.rb: register nodes when
dumping objects with custom coders. [ruby-core:66215] [Bug #10496]

* test/psych/test_coder.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06 08:50:00 +00:00
tenderlove 56d4257a67 * ext/psych/lib/psych/visitors/to_ruby.rb: fix support for regular
expressions with newlines. tenderlove/psych#222

* test/psych/test_yaml.rb: test for change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06 08:00:54 +00:00
tenderlove 6ce27adabe * ext/psych/lib/psych/visitors/to_ruby.rb: fix parsing hashes with
instance variables when it is referenced multiple times.
* ext/psych/lib/psych.rb: bump version
* ext/psych/psych.gemspec: bump version
* test/psych/test_hash.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-28 17:37:09 +00:00
nobu f59ce53f26 yaml_tree.rb: fix anchor
* ext/psych/lib/psych/visitors/yaml_tree.rb (visit_String):
  anchors like `\Z` are not valid inside character class.  use
  negative-lookahead instead.
  Fixes: https://github.com/tenderlove/psych/issues/221

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-17 14:59:18 +00:00
tenderlove fe0414b547 * ext/psych/lib/psych/visitors/yaml_tree.rb: only dump hash
subclasses. Thanks Joe Eli McIlvain <joe.eli.mac@gmail.com>

* test/psych/test_hash.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-16 06:39:13 +00:00
tenderlove a5c577757e * ext/psych/lib/psych.rb: bump version
* ext/psych/lib/psych/visitors/yaml_tree.rb: fix line width wrapping
  for long strings.  Thanks Jakub Jirutka <jakub@jirutka.cz>

* test/psych/test_string.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-16 06:37:22 +00:00
tenderlove 344b8bbd69 * ext/psych/lib/psych/visitors/yaml_tree.rb: correctly quote non-ascii
letters. Thanks @jirutka for the patch.

* test/psych/test_string.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 22:25:31 +00:00
tenderlove 5dabead187 * ext/psych/lib/psych/visitors/to_ruby.rb: call `allocate` on hash
subclasses.  Fixes github.com/tenderlove/psych/issues/196

* test/psych/test_hash.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 22:15:20 +00:00
tenderlove 8c08c8298a * ext/psych/lib/psych/visitors/to_ruby.rb: revive hashes with ivars
* ext/psych/lib/psych/visitors/yaml_tree.rb: dump hashes with ivars.
  Fixes github.com/psych/issues/43

* test/psych/test_hash.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 22:00:54 +00:00
tenderlove 12396fda40 * ext/psych/lib/psych/visitors/to_ruby.rb: support objects that are
marshalable, but inherit from basic object.
  Thanks Sean Griffin <sean@thoughtbot.com>

* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto

* test/psych/test_marshalable.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 21:35:11 +00:00
usa 37d0c509b7 * test/psych/json/test_stream.rb (Psych::JSON::TestStream::test_list_to_json):
escape `]`.

* test/psych/test_json_tree.rb (Psych::JSON::TestJSONTree#test_list_to_json):
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-20 08:04:29 +00:00
headius 08d0b57000 * test/psych/test_emitter.rb: Fix line_width test...initial value
is impl-specific and attr assignment always returns LHS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 19:37:38 +00:00
tenderlove 66d3b9750b * ext/psych/lib/psych/visitors/yaml_tree.rb: fix NameError dumping and
loading. Fixes GH #85. Thanks @brentdax for the patch!
* test/psych/test_exception.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 21:41:02 +00:00
tenderlove 8662841a9b * ext/psych/lib/psych/scalar_scanner.rb: fix loading strings that
look like integers but have a newline. Fixes GH #189
* test/psych/test_string.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 21:24:33 +00:00
tenderlove 73645bb8e5 * ext/psych/lib/psych/visitors/to_ruby.rb: merge keys with a hash
should merge the hash in to the parent.
* test/psych/test_merge_keys.rb: test for change. Fixes GH #202

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 21:11:47 +00:00
tenderlove 7a5dedf25c * ext/psych/lib/psych/visitors/to_ruby.rb: quoted "<<" strings
should not be treated as merge keys.
* ext/psych/lib/psych/visitors/yaml_tree.rb: hashes with keys
  containing "<<" should roundtrip.
* test/psych/test_merge_keys.rb: test for change. Fixes GH #203

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-29 21:02:19 +00:00
tenderlove 0b392535df * ext/psych/lib/psych/visitors/to_ruby.rb: backwards compatibility for
hashes emitted by Syck. Github #198
* test/psych/test_hash.rb: test for change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-05 18:41:46 +00:00
nobu 861b7d781e fix encoding spec
"UTF-8" is invalid encoding name in Emacs, use "utf-8" instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 07:55:58 +00:00
hsbt 46724873b0 Revert "Revert "* lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]""
syck-1.0.3 gem support this imcompatible changes.

This reverts commit r46102

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26 02:52:46 +00:00
tenderlove 3f6eafaaa0 * ext/psych/lib/psych/visitors/yaml_tree.rb: dump empty symbols with a
tag so that they can be parsed on input. [Bug #9873] [ruby-core:62825]
* test/psych/test_symbol.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-05 22:42:58 +00:00
naruse a95be81ea2 Revert "* lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]"
zzak is not the maintainer of yaml.
This reverts commit r46097.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-25 03:33:22 +00:00
zzak 7833e69c2e * lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]
* test/psych/*: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-25 02:33:51 +00:00
tenderlove db17d694ea * ext/psych/lib/psych/visitors/yaml_tree.rb: support dumping Encoding
objects.

* ext/psych/lib/psych/visitors/to_ruby.rb: support loading Encoding
  objects.

* test/psych/test_encoding.rb: add test

* ext/psych/lib/psych.rb: add version

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-01 02:09:53 +00:00
hsbt 64d35eb621 * test/test/psych/test_string.rb: remove unused variables.
* test/test/psych/test_yaml.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-18 00:44:38 +00:00
tenderlove b90076e85c * ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings with
quotes should not have changed.  [ruby-core:59316] [Bug #9300]

* ext/psych/lib/psych.rb: fixed missing require.

* test/psych/test_string.rb: test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 00:56:45 +00:00
tenderlove 7c6e4f8f38 * ext/psych/lib/psych/visitors/to_ruby.rb: anonymous structs
should be able to roundtrip.  Thanks @splattael!

* test/psych/test_object_references.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 00:54:37 +00:00
tenderlove 079ff69ca0 * ext/psych/lib/psych/scalar_scanner.rb: fix support for negative
years.
* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
* test/psych/test_date_time.rb: test for change.
  Fixes: https://github.com/tenderlove/psych/issues/168

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 21:41:48 +00:00
tenderlove 725d6f4970 * ext/psych/lib/psych/scalar_scanner.rb: fix regexp for matching TIME
strings.
* test/psych/test_date_time.rb: test for change.
  Fixes: https://github.com/tenderlove/psych/issues/171

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 19:48:03 +00:00
tenderlove 9ae2651d19 * ext/psych/lib/psych/visitors/to_ruby.rb: process merge keys before
reviving objects. Fixes GH psych #168
* test/psych/test_merge_keys.rb: test for change
  https://github.com/tenderlove/psych/issues/168

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 19:15:40 +00:00
tenderlove e0c6dd91a4 * ext/psych/lib/psych/visitors/yaml_tree.rb: string subclasses should
not be considered to be binary.  Fixes Psych / GH 166
  https://github.com/tenderlove/psych/issues/166

* test/psych/test_string.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 18:10:24 +00:00
tenderlove 8579a33966 * ext/psych/lib/psych/visitors/yaml_tree.rb: use double quotes when
strings start with special characters.
  [Fixes GH-157] https://github.com/tenderlove/psych/issues/157

* test/psych/test_string.rb: test for change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 17:39:53 +00:00
tenderlove c94b0e8568 backport Tempfile.create so psych tests will run outside ruby trunk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-28 17:55:50 +00:00
tenderlove 48602d1dbf * ext/psych/lib/psych/scalar_scanner.rb: invalid floats should be
treated as strings.
  [Fixes GH-156] https://github.com/tenderlove/psych/issues/156

* test/psych/test_string.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-28 17:42:38 +00:00
tenderlove c62aca26c5 * ext/psych/lib/psych/visitors/yaml_tree.rb: register time objects so
they are referenced as ids during output.
* test/psych/test_date_time.rb: corresponding test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05 19:51:12 +00:00
tenderlove 7ceafcbdf5 * ext/psych/lib/psych.rb: Adding Psych.safe_load for loading a user
defined, restricted subset of Ruby object types.
* ext/psych/lib/psych/class_loader.rb: A class loader for
  encapsulating the logic for which objects are allowed to be
  deserialized.
* ext/psych/lib/psych/deprecated.rb: Changes to use the class loader
* ext/psych/lib/psych/exception.rb: ditto
* ext/psych/lib/psych/json/stream.rb: ditto
* ext/psych/lib/psych/nodes/node.rb: ditto
* ext/psych/lib/psych/scalar_scanner.rb: ditto
* ext/psych/lib/psych/stream.rb: ditto
* ext/psych/lib/psych/streaming.rb: ditto
* ext/psych/lib/psych/visitors/json_tree.rb: ditto
* ext/psych/lib/psych/visitors/to_ruby.rb: ditto
* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
* ext/psych/psych_to_ruby.c: ditto
* test/psych/helper.rb: ditto
* test/psych/test_safe_load.rb: tests for restricted subset.
* test/psych/test_scalar_scanner.rb: ditto
* test/psych/visitors/test_to_ruby.rb: ditto
* test/psych/visitors/test_yaml_tree.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14 17:26:41 +00:00
tenderlove d7f06a665c * test/psych/helper.rb: envutil is not available outside Ruby, so
port the functions from envutil to the test helper.

* test/psych/test_deprecated.rb: ditto

* test/psych/test_encoding.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14 17:07:51 +00:00
akr 8f671120f1 * test/csv/test_features.rb, test/logger/test_logger.rb
test/mkmf/test_have_macro.rb, test/net/http/test_http.rb,
  test/openssl/test_config.rb, test/psych/test_encoding.rb,
  test/psych/test_exception.rb, test/psych/test_psych.rb,
  test/psych/test_tainted.rb, test/readline/test_readline.rb,
  test/rexml/test_contrib.rb, test/ruby/test_autoload.rb,
  test/ruby/test_beginendblock.rb, test/ruby/test_exception.rb,
  test/ruby/test_file.rb, test/ruby/test_io.rb,
  test/ruby/test_marshal.rb, test/ruby/test_process.rb,
  test/ruby/test_require.rb, test/ruby/test_rubyoptions.rb,
  test/syslog/test_syslog_logger.rb, test/webrick/test_httpauth.rb,
  test/zlib/test_zlib.rb: Use Tempfile.create.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-20 23:03:52 +00:00
tenderlove 2a58706e2d * ext/psych/lib/psych/visitors/yaml_tree.rb: fix symbol keys in coder
emission.  Thanks @tjwallace
* test/psych/test_coder.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 18:12:52 +00:00
tenderlove 0cb251e079 change test name to be more helpful
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 18:02:22 +00:00
tenderlove 7a7bb64464 * ext/psych/lib/psych/visitors/to_ruby.rb: correctly register
self-referential strings. Fixes tenderlove/psych #135

* test/psych/test_string.rb: appropriate test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05 17:11:21 +00:00
naruse 7a77e12488 Suppress warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-02 02:14:21 +00:00
xibbar d85bf93776 * test/psych/test_*.rb: use require_relative to require local library
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-26 14:55:04 +00:00
akr 052c0e67d9 * test/ruby/test_require.rb: Remove temporally files in the tests.
* test/ruby/test_rubyoptions.rb: Ditto.

* test/logger/test_logger.rb: Ditto.

* test/psych/test_psych.rb: Ditto.

* test/readline/test_readline.rb: Ditto.

* test/syslog/test_syslog_logger.rb: Ditto.

* test/webrick/test_httpauth.rb: Ditto.

* test/zlib/test_zlib.rb: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-24 02:06:32 +00:00
tenderlove 1c836f811c * ext/psych/lib/psych/visitors/yaml_tree.rb: fixing string quotation
when dumping Ruby strings. Thanks Ingy

* test/psych/test_psych.rb: appropriate tests.

* test/psych/test_yaml.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 23:54:29 +00:00
akr 2d55537dce * test/ruby/test_marshal.rb: remove temporally files early.
* test/ruby/test_process.rb: ditto.

* test/psych/test_exception.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-29 03:06:40 +00:00
tenderlove 0a60805af5 * ext/psych/lib/psych/visitors/to_ruby.rb: merge key values that
contain something besides a hash should be left in tact.

* test/psych/test_merge_keys.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-12 00:00:12 +00:00
tenderlove b104e2524d * ext/psych/lib/psych/scalar_scanner.rb: strip trailing dots from
floats so that Float() will not raise an exception.

* test/psych/test_numeric.rb: test to ensure "1." can be loaded

* test/psych/test_string.rb: make sure "1." can round trip

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-09 19:26:45 +00:00
tenderlove ac8b1869c0 * ext/psych/lib/psych/visitors/yaml_tree.rb: ascii only binary strings
will be dumped as unicode.  Thanks Paul Kunysch!

* test/psych/test_string.rb: appropriate test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-09 19:26:36 +00:00
tenderlove 8a4cc4e02a * ext/psych/lib/psych/visitors/yaml_tree.rb: quote strings that begin
with non-word characters.  Thanks Alex Tambellini!
* test/psych/test_yaml.rb: appropriate test case

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-13 22:45:16 +00:00