aboutsummaryrefslogtreecommitdiffstats
path: root/test/psych
Commit message (Collapse)AuthorAgeFilesLines
...
* * test/ruby/test_require.rb: Remove temporally files in the tests.akr2013-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | * 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
* * ext/psych/lib/psych/visitors/yaml_tree.rb: fixing string quotationtenderlove2013-02-072-2/+11
| | | | | | | | | | 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
* * test/ruby/test_marshal.rb: remove temporally files early.akr2013-01-291-0/+1
| | | | | | | | | | * 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
* * ext/psych/lib/psych/visitors/to_ruby.rb: merge key values thattenderlove2013-01-121-0/+51
| | | | | | | | 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
* * ext/psych/lib/psych/scalar_scanner.rb: strip trailing dots fromtenderlove2013-01-092-0/+8
| | | | | | | | | | 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
* * ext/psych/lib/psych/visitors/yaml_tree.rb: ascii only binary stringstenderlove2013-01-091-2/+21
| | | | | | | | 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
* * ext/psych/lib/psych/visitors/yaml_tree.rb: quote strings that begintenderlove2012-12-131-0/+6
| | | | | | | 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
* test: remove or replace trailing spacesnobu2012-12-071-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/yaml_tree.rb: use literal YAML styletenderlove2012-11-171-0/+5
| | | | | | | | when emitting multi-line strings. Thanks @atambo * test/psych/test_yaml.rb: test for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/scalar_scanner.rb: avoid raising exceptions whentenderlove2012-11-171-0/+16
| | | | | | | parsing Floats and Integers. Thanks riffraff [ruby-core:44426] * test/psych/test_numeric.rb: associated test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file_internal): set default source encoding asnaruse2012-11-062-1/+2
| | | | | | | | | UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679] * parse.y (parser_initialize): set default parser encoding as UTF-8 instead of US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/handlers/recorder.rb: added a class fortenderlove2012-10-291-0/+25
| | | | | | | | | | | recording YAML parse and emit events. * ext/psych/lib/psych/handler.rb: adding a list of events so that handler classes can more easily be meta-programmed. * test/psych/handlers/test_recorder.rb: tests for the change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/yaml_tree.rb: `tree` should return thetenderlove2012-10-281-0/+7
| | | | | | | | same thing on every call. * test/psych/visitors/test_yaml_tree.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/yaml_tree.rb: YAML Tree object shouldtenderlove2012-10-281-0/+11
| | | | | | | | be able to take an emitter object as it's output. * test/psych/visitors/test_yaml_tree.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/parser.c: just get the constant defined in Ruby.tenderlove2012-10-221-0/+21
| | | | | | | | | * ext/psych/lib/psych/syntax_error.rb: Psych::SyntaxError now inherits from StandardError rather than SyntaxError. Thanks Eric Hodel! * test/psych/test_exception.rb: tests for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/scalar_scanner.rb: Ignore bad timestamps. Iftenderlove2012-10-221-0/+11
| | | | | | | | | | something looks like a timestamp but has an invalid component, treat it as a string instead of throwing an ArgumentError. Thanks Rhett Sutphin! * test/psych/test_scalar_scanner.rb: appropriate tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/scalar_scanner.rb: Fix scalar_scanner totenderlove2012-10-221-0/+4
| | | | | | | | | understand strings starting with an underscore and containing only digits. Thanks Kelley Reynolds. * test/psych/test_scalar_scanner.rb: test for fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syck: removed. Fixes [ruby-core:43360]tenderlove2012-08-221-10/+0
| | | | | | | | | * test/syck: removed. * lib/yaml.rb: only require psych, show a warning if people try to set the engine to syck. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 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