aboutsummaryrefslogtreecommitdiffstats
path: root/test/psych
Commit message (Collapse)AuthorAgeFilesLines
* * 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
* * ext/psych/parser.c (parse): strings from psych have proper tainttenderlove2011-04-211-0/+128
| | | | | | | markings. * test/psych/test_tainted.rb: test for string taint git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixing syntax error in 1.8tenderlove2011-03-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* converting require_relative to just regular requirestenderlove2011-03-3038-38/+38
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/yaml_tree.rb: Rescue exceptions whentenderlove2011-03-091-0/+6
| | | | | | | | | | people implement the method method. Thanks Lin Jen-Shin. [ruby-core:35255] * test/psych/visitors/test_yaml_tree.rb: test for implementation of method method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/scalar_scanner.rb: fix parsing timezone's whosetenderlove2011-02-251-12/+11
| | | | | | | | whose format is (+/-)hhmm. Thanks Gonçalo Silva! * test/psych/test_scalar_scanner.rb: test for bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/json/stream.rb: do not emit custom tags in mapstenderlove2011-02-212-0/+31
| | | | | | | | | | or sequences when emitting JSON. * ext/psych/lib/psych/json/tree_builder.rb: do not emit custom tags in sequences when emitting JSON. * test/psych/json/test_stream.rb: tests for custom stream emits. * test/psych/test_json_tree.rb: tests for JSON emits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/json/stream.rb: fix JSON stream emits to usetenderlove2011-02-211-6/+20
| | | | | | | double quotes during stream. * test/psych/json/test_stream.rb: tests to reflect changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: ARG_ENCODING_NONE regulartenderlove2011-02-021-0/+5
| | | | | | | | | | expressions can round trip. [ruby-core:34969] * test/psych/test_yaml.rb: test for ARG_ENCODING_NONE regex * ext/sych/lib/syck/rubytypes.rb: ARG_ENCODING_NONE regular expressions can round trip. * test/syck/test_yaml.rb: test for ARG_ENCODING_NONE regex git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* reverting r30628 since this seems like a bug in libyamltenderlove2011-01-221-15/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: fixing merge key supporttenderlove2011-01-221-0/+51
| | | | | | | when multiple merge keys are specified. * test/psych/test_merge_keys.rb: tests for multi-merge key support git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: merge keys are actuallytenderlove2011-01-221-0/+21
| | | | | | | | part of YAML 1.1, so they should be supported. Remove warning and merge keys to parent. [ruby-core:34679] * test/psych/test_merge_keys.rb: test for merge keys git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/parser.c (parse): fixing off-by-one error on line numberstenderlove2011-01-221-0/+15
| | | | | | | in parse exceptions. [ruby-core:34690] * test/psych/test_parser.rb: test for error git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e