summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2015-08-27Fix Encoding::UndefinedConversionError when dumping non ascii string to a file.Yuji Yamano
2015-08-27removed Ruby 1.9 supportSHIBATA Hiroshi
2015-04-29Merge branch 'master' into jrubyAaron Patterson
* master: add test don't assume any tag starting with 'str' is a string
2015-03-30add testfilialpails
2015-03-03Merge branch 'master' into jrubyAaron Patterson
* master: Adding Rubinius as an Allowed Failure bump version Fix CVE-2014-9130 Adding RVM listing for Rubinius fix minitest warnings * ext/psych/lib/psych/visitors/yaml_tree.rb: register nodes when dumping objects with custom coders. [ruby-core:66215] [Bug #10496] * ext/psych/lib/psych/visitors/to_ruby.rb: fix support for regular expressions with newlines. tenderlove/psych#222 * 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 bump version Fix anchor Fix assertion regexps bump version Only dump ivars for subclasses of String, not for String. With cf0dd2b93f1552a3c452a0bfa0e996f441d5e27e, fixes #217. Only dump ivars for subclasses of Hash, not for Hash. Fixes #216. Fixes part of #217. Fix block chomping and add more tests Preset @line_width in YAMLTree#initialize for better performance Use appropriate style for serialized strings Remove unnnecessary 'str' variable in YAMLTree#visit_String
2015-02-06fix minitest warningsAaron Patterson
2015-02-06* ext/psych/lib/psych/visitors/yaml_tree.rb: register nodes whenAaron Patterson
dumping objects with custom coders. [ruby-core:66215] [Bug #10496] * test/psych/test_coder.rb: test for fix
2015-02-06* ext/psych/lib/psych/visitors/to_ruby.rb: fix support for regularAaron Patterson
expressions with newlines. tenderlove/psych#222 * test/psych/test_yaml.rb: test for change. fixes #222
2015-01-28* ext/psych/lib/psych/visitors/to_ruby.rb: fix parsing hashes withAaron Patterson
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
2015-01-17Fix anchorNobuyoshi Nakada
Anchors like `\Z` are not valid inside character class. Use negative-lookahead instead.
2015-01-17Fix assertion regexpsNobuyoshi Nakada
`|' is a meta character, so needs to be escaped.
2015-01-15Only dump ivars for subclasses of Hash, not for Hash.Joe Eli McIlvain
Fixes #216. Fixes part of #217.
2015-01-13Fix block chomping and add more testsJakub Jirutka
When no [chomping indicator][1] is specified for a folded or literal block, then YAML parser should preserve the final line break (i.e. the string should end with \n). This implies that when dumping a string *without* the trailing newline to YAML, we should specify the stripping indicator (-). [1]: http://yaml.org/spec/1.2/2009-07-21/spec.html#id2593651
2015-01-12Use appropriate style for serialized stringsJakub Jirutka
When psych parses YAML with string in the folded style as: a: > some inline content and serializes it back to YAML, then it renders the string in the literal style instead: a: | some inline content This patch fixes this behaviour. When a string doesn't contain newlines (blank line at the end is ignored) and it's not necessary to be quoted, then it will use plain style or folded style according to its length and the `line_width` option. # line_width = 100 a: some inline content # line_width = 11 a: > some inline content This change was originally proposed by @Iazel.
2015-01-09Merge remote-tracking branch 'origin/master' into jrubyCharles Oliver Nutter
Conflicts: .gitignore
2015-01-09Update to latest code from JRuby master.Charles Oliver Nutter
2015-01-08Merge branch 'master' into jirutka-patch-1Aaron Patterson
* master: (21 commits) * ext/psych/lib/psych/visitors/to_ruby.rb: call `allocate` on hash subclasses. Fixes github.com/tenderlove/psych/issues/196 * ext/psych/lib/psych/visitors/to_ruby.rb: revive hashes with ivars removed isolate task removed isolate plugin added minitest dependency into gemspec added install task into travis added ruby-head env bumping version to 2.0.8 fixed build error caused by trunk changes bumping version to 2.0.7 merging from ruby trunk backport r48512 from ruby/ruby trunk. Add changelog for 2a4d9568f7d5d19c00231cf48eb855cc45ec3394 backport r48214 from ruby/ruby trunk. Allow dumping any BasicObject that defines #marshal_dump or #marshal_load bumping version * 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 * 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 * 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 * 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 ... Conflicts: lib/psych/visitors/yaml_tree.rb
2015-01-08* ext/psych/lib/psych/visitors/to_ruby.rb: call `allocate` on hashAaron Patterson
subclasses. Fixes github.com/tenderlove/psych/issues/196 * test/psych/test_hash.rb: test for change fixes #196
2015-01-08* ext/psych/lib/psych/visitors/to_ruby.rb: revive hashes with ivarsAaron Patterson
* 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 fixes #43
2014-11-23backport r48512 from ruby/ruby trunk.SHIBATA Hiroshi
2014-11-02backport r48214 from ruby/ruby trunk.SHIBATA Hiroshi
2014-09-17Allow dumping any BasicObject that defines #marshal_dump or #marshal_loadSean Griffin
Additionally, it is assumed that these objects will have implemented `respond_to?` and `class`, (e.g. SimpleDelegator). These assumptions are reasonably inline with the assumptions of `Marshal` in regards to `BasicObject`s.
2014-08-29* ext/psych/lib/psych/visitors/yaml_tree.rb: fix NameError dumping andAaron Patterson
loading. Fixes GH #85. Thanks @brentdax for the patch! * test/psych/test_exception.rb: test for fix fixes #85
2014-08-29* ext/psych/lib/psych/scalar_scanner.rb: fix loading strings thatAaron Patterson
look like integers but have a newline. Fixes GH #189 * test/psych/test_string.rb: test for fix Fixes #189
2014-08-29* ext/psych/lib/psych/visitors/to_ruby.rb: merge keys with a hashAaron Patterson
should merge the hash in to the parent. * test/psych/test_merge_keys.rb: test for change. Fixes GH #202 Fixes #202
2014-08-29* ext/psych/lib/psych/visitors/to_ruby.rb: quoted "<<" stringsAaron Patterson
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 fixes #203
2014-08-16Don't quote scalar values beginning with non-ASCII characterJakub Jirutka
2014-08-05* ext/psych/lib/psych/visitors/to_ruby.rb: backwards compatibility forAaron Patterson
hashes emitted by Syck. Github #198 * test/psych/test_hash.rb: test for change. fixes #198
2014-07-25backport r46948 from ruby/ruby trunk.SHIBATA Hiroshi
2014-06-26Manually reverted fa6aac2ab19762775fba78c264159efb4fcf3ecfSHIBATA Hiroshi
2014-06-05* ext/psych/lib/psych/visitors/yaml_tree.rb: dump empty symbols with aAaron Patterson
tag so that they can be parsed on input. [Bug #9873] [ruby-core:62825] * test/psych/test_symbol.rb: test for change
2014-05-25Revert "YAML::ENGINE was removed in [Bug #8344]"SHIBATA Hiroshi
This reverts commit fa6aac2ab19762775fba78c264159efb4fcf3ecf.
2014-05-24YAML::ENGINE was removed in [Bug #8344]Zachary Scott
2014-02-28 * ext/psych/lib/psych/visitors/yaml_tree.rb: support dumping EncodingAaron Patterson
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
2014-02-18remove unused variablesSHIBATA Hiroshi
2014-01-08* ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings withAaron Patterson
quotes should not have changed. [ruby-core:59316] [Bug #9300] * ext/psych/lib/psych.rb: fixed missing require. * test/psych/test_string.rb: test
2013-12-05Add failing test for Struct referencesPeter Suschlik
The tests fails with Psych::BadAlias: Unknown alias: 1
2013-11-26Enable YAML serialization of Ruby delegators and simple delegatorsSteve Richert
2013-11-26fix support for negative years.Aaron Patterson
Fixes #168
2013-11-26fix regexp for matching TIME.Aaron Patterson
fixes #171
2013-11-05* ext/psych/lib/psych/visitors/to_ruby.rb: process merge keys beforeAaron Patterson
reviving objects. Fixes GH psych #168 * test/psych/test_merge_keys.rb: test for change https://github.com/tenderlove/psych/issues/168 Fixes #169
2013-10-29* ext/psych/lib/psych/visitors/yaml_tree.rb: string subclasses shouldAaron Patterson
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 Fixes #166
2013-09-05* ext/psych/lib/psych/visitors/yaml_tree.rb: use double quotes whenAaron Patterson
strings start with special characters. [Fixes GH-157] https://github.com/tenderlove/psych/issues/157 * test/psych/test_string.rb: test for change. Fixes #157
2013-08-28backport Tempfile.create so psych tests will run outside ruby trunkAaron Patterson
2013-08-28* ext/psych/lib/psych/scalar_scanner.rb: invalid floats should beAaron Patterson
treated as strings. [Fixes GH-156] https://github.com/tenderlove/psych/issues/156 * test/psych/test_string.rb: test for change fixes #156
2013-07-05* ext/psych/lib/psych/visitors/yaml_tree.rb: register time objects soAaron Patterson
they are referenced as ids during output. * test/psych/test_date_time.rb: corresponding test. Fixes #146
2013-05-14* ext/psych/lib/psych.rb: Adding Psych.safe_load for loading a userAaron Patterson
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
2013-05-14merge from RubyAaron Patterson
2013-05-14merging from RubyAaron Patterson
2013-04-26Remove remaining .swp fileKevin