aboutsummaryrefslogtreecommitdiffstats
path: root/test/psych
Commit message (Collapse)AuthorAgeFilesLines
...
* * lib/open-uri.rb: delete space.ayumin2012-07-171-5/+5
| | | | | | * test/psych/test_alias_and_anchor.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: strings with YAML anchorstenderlove2012-07-161-0/+70
| | | | | | | | | are properly referenced. Patched by Joe Rafaniello via Github: https://github.com/tenderlove/psych/pull/69 * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto * test/psych/test_alias_and_anchor.rb: test for change git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: fix a bug with stringtenderlove2012-05-152-0/+17
| | | | | | | | | | subclass dumping and loading. * test/psych/test_array.rb: pertinent tests * test/psych/test_string.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: convert omap tagged maps totenderlove2012-05-151-0/+7
| | | | | | | | Psych::Omap objects rather than hashes. [Bug #6425] * test/psych/test_omap.rb: pertinent test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test for yaml ast roundtrippingtenderlove2012-04-281-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/parser.c: fall back to any encoding if the externaltenderlove2012-04-061-1/+1
| | | | | | | encoding is wrong. [ruby-core:44163] * test/psych/test_encoding.rb: fix test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych.rb (load, parse): stop parsing or loading aftertenderlove2012-03-081-0/+10
| | | | | | | | the first document has been parsed. * test/psych/test_stream.rb: pertinent tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych.rb (parse_stream, load_stream): if a block istenderlove2012-03-081-0/+34
| | | | | | | | | | | | given, documents will be yielded to the block as they are parsed. [ruby-core:42404] [Bug #5978] * ext/psych/lib/psych/handlers/document_stream.rb: add a handler that yields documents as they are parsed * test/psych/test_stream.rb: corresponding tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* only run `test_key` on ruby 2.0.0 or uptenderlove2012-03-051-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych.rb: default open YAML files with utf8 externaltenderlove2012-02-281-1/+1
| | | | | | | encoding. [ruby-core:42967] * test/psych/test_tainted.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/parser.c: prevent a memory leak by protecting calls totenderlove2012-02-241-0/+30
| | | | | | | handler callbacks. * test/psych/test_parser.rb: test to demonstrate leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/parser.c: set parser encoding based on the YAML inputtenderlove2012-02-233-1/+77
| | | | | | | | | rather than user configuration. * test/psych/test_encoding.rb: corresponding tests. * test/psych/test_parser.rb: ditto * test/psych/test_tainted.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/parser.c: removed external encoding setter, allow parsertenderlove2012-02-091-9/+6
| | | | | | | | to be reused. * ext/psych/lib/psych/parser.rb: added external encoding setter. * test/psych/test_parser.rb: test parser reuse git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: Added support for loadingtenderlove2012-01-181-0/+25
| | | | | | | | | subclasses of String with ivars * ext/psych/lib/psych/visitors/yaml_tree.rb: Added support for dumping subclasses of String with ivars * test/psych/test_string.rb: corresponding tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: Added ability to load arraytenderlove2012-01-181-0/+28
| | | | | | | | | subclasses with ivars. * ext/psych/lib/psych/visitors/yaml_tree.rb: Added ability to dump array subclasses with ivars. * test/psych/test_array.rb: corresponding tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: BigDecimals can be restoredtenderlove2011-12-181-0/+11
| | | | | | | | | from YAML. * ext/psych/lib/psych/visitors/yaml_tree.rb: BigDecimals can be dumped to YAML. * test/psych/test_numeric.rb: tests for BigDecimal serialization git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/scalar_scanner.rb: Strings that look like datestenderlove2011-12-181-0/+22
| | | | | | | | should be treated as strings and not dates. * test/psych/test_scalar_scanner.rb: corresponding tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych.rb (module Psych): parse and load methods taketenderlove2011-12-061-1/+77
| | | | | | | | | | an optional file name that is used when raising Psych::SyntaxError exceptions * ext/psych/lib/psych/syntax_error.rb (module Psych): allow nil file names and handle nil file names in the exception message * test/psych/test_exception.rb (module Psych): Tests for changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/parser.c (parse): parse method can take an option filetenderlove2011-11-301-0/+7
| | | | | | | name for use in exception messages. * test/psych/test_parser.rb: corresponding tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* An address can be negative.naruse2011-11-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* infinite loop seems to be fixed, so I can uncomment this assertion.tenderlove2011-11-171-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/tree_builder.rb: dump complex numbers,tenderlove2011-11-081-0/+67
| | | | | | | | | | rationals, etc with reference ids. * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto * ext/psych/lib/psych/visitors/to_ruby.rb: loading complex numbers, rationals, etc with reference ids. * test/psych/test_object_references.rb: corresponding tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/scalar_scanner.rb: make sure strings that looktenderlove2011-11-071-0/+6
| | | | | | | like base 60 numbers are serialized as quoted strings. * test/psych/test_string.rb: test for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/test_yamlstore.rb: make test case inherit from MiniTest,tenderlove2011-11-071-4/+3
| | | | | | load psych/helper so that psych is loaded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/test_yamldbm.rb: Test case should inherit from MiniTest,tenderlove2011-11-071-4/+5
| | | | | | load psych/helper so that psych and friends are loaded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Don't define tests if there is no psych.naruse2011-11-032-4/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/test_yamldbm.rb: avoid platform dependency.ayumin2011-11-011-4/+4
| | | | | | | patch by Naohisa Goto. [ruby-dev:44763] [Bug #5535] * test/syck/test_yamldbm.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/test_yamldbm.rb: don't run test if the systemktsj2011-10-091-5/+9
| | | | | | | | don't support yaml/dbm. * test/syck/test_yamldbm.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/syntax_error.rb: Add file, line, offset, andtenderlove2011-10-041-0/+15
| | | | | | | | | message attributes during parse failure. * ext/psych/parser.c: Update parser to raise exception with correct values. * test/psych/test_exception.rb: corresponding tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych.rb: calling `yaml` rather than `to_yaml`.tenderlove2011-10-033-13/+13
| | | | | | | | | | * ext/psych/lib/psych/nodes/node.rb: Rename `to_yaml` to just `yaml` in order to avoid YAML::ENGINE switching from replacing this method. * test/psych/helper.rb: fix tests for method name change. * test/psych/test_document.rb: ditto * test/psych/visitors/test_emitter.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/scalar_scanner.rb: Match values against thetenderlove2011-10-031-0/+14
| | | | | | | floating point spec defined in YAML to avoid erronious parses. * test/psych/test_numeric.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/test_yamldbm.rb: add test case.ayumin2011-10-021-0/+29
| | | | | | * test/syck/test_yamldbm.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/test_yamlstore.rb: use tmpdir for tmpfile.ayumin2011-09-271-2/+10
| | | | | | * test/syck/test_yamlstore.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/psych/test_yamldbm.rb (require): fix #setup and #terdown.ayumin2011-09-261-2/+11
| | | | | | | [Bug #5370] [ruby-core:39730] * test/syck/test_yamldbm.rb (require): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/syck/test/yamldbm.rb: add test for Syck::DBM.ayumin2011-09-252-0/+231
| | | | | | | * test/psych/test_yamldbm.rb: add test for Psych::DBM. * test/psych/test_yamlstore.rb: add test for Psych::PStore. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove assertion which depends the load ordernaruse2011-09-071-8/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/yaml_tree.rb: emit strings tagged astenderlove2011-09-011-0/+8
| | | | | | | ascii-8bit as binary in YAML. * test/psych/test_string.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use psych_yaml_as to avoid collision with Syck.naruse2011-08-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/nodes/node.rb: default `to_yaml` encoding to betenderlove2011-08-241-0/+16
| | | | | | | UTF-8. * test/psych/test_encoding.rb: test yaml dump encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/core_ext.rb: Make Kernel#y private.tenderlove2011-08-131-0/+7
| | | | | | | [ruby-core:38913] * test/psych/test_yaml.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use ::Syck explicitly.naruse2011-07-271-1/+1
| | | | | | | lib/rubygems/requirement.rb defines YAML::Syck. So explicitly specify the top level one. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych.rb: define a new BadAlias error class.tenderlove2011-07-181-0/+9
| | | | | | | | * ext/psych/lib/psych/visitors/to_ruby.rb: raise an exception when deserializing an alias that does not exist. * test/psych/test_merge_keys.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: Fix cyclic references oftenderlove2011-06-211-0/+17
| | | | | | | objects. Thanks to CvX for reporting the bug and a test case. * test/psych/test_object.rb: test for cyclic object references. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix ambiguous argument warnings in test/psych/test_nil.rbtenderlove2011-06-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Allow "--- \n" as a yaml dumped result for nil.naruse2011-06-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: Hash subclasses can be readtenderlove2011-06-091-0/+14
| | | | | | | | | from YAML files. * ext/psych/lib/psych/visitors/yaml_tree.rb: Hash subclasses can be dumped to YAML files. * test/psych/test_hash.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: Ruby modules can be loadedtenderlove2011-06-091-0/+17
| | | | | | | | | from YAML files. * ext/psych/lib/psych/visitors/yaml_tree.rb: Ruby modules can be dumped to YAML files. * test/psych/test_class.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: Ruby classes can be loadedtenderlove2011-06-091-5/+7
| | | | | | | | | from YAML files. * ext/psych/lib/psych/visitors/yaml_tree.rb: Ruby classes can be dumped to YAML files. * test/psych/test_class.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2011-05-152-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/yaml_tree.rb: fix time dumping so thattenderlove2011-05-033-2/+8
| | | | | | Syck can load UTC times that Psych dumps. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e