summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych
AgeCommit message (Collapse)Author
2012-10-22* ext/psych/lib/psych/visitors/to_ruby.rb: Handle nil tags speciallytenderlove
to avoid slow method_missing calls. Thanks Kevin Menard! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-22* ext/psych/lib/psych/scalar_scanner.rb: Ignore bad timestamps. Iftenderlove
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
2012-10-22* ext/psych/lib/psych/scalar_scanner.rb: Fix scalar_scanner totenderlove
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
2012-07-19* ext/psych/emitter.c (initialize): allow a configuration object to betenderlove
passed to the constructor so that mutation isn't required after instantiation. * ext/psych/lib/psych/handler.rb: add configuration object * ext/psych/lib/psych/visitors/emitter.rb: use configuration object if extra configuration is present. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-16* ext/psych/lib/psych/visitors/to_ruby.rb: strings with YAML anchorstenderlove
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
2012-05-15* ext/psych/lib/psych/visitors/to_ruby.rb: fix a bug with stringtenderlove
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
2012-05-15* ext/psych/lib/psych/visitors/to_ruby.rb: convert omap tagged maps totenderlove
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
2012-05-15* ext/psych/lib/psych/visitors/yaml_tree.rb: keep a reference totenderlove
custom coders so that GC does not impact dumped yaml reference ids. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-29* ext/psych/lib/psych/json/yaml_events.rb: implicit styles should nottenderlove
be changeable for JSON events. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-27* ext/psych/lib/psych.rb: updating version to match gemtenderlove
* ext/psych/psych.gemspec: ditto * ext/psych/lib/psych/visitors/to_ruby.rb: fixing deprecation warning git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-08* ext/psych/lib/psych.rb (parse_stream, load_stream): if a block istenderlove
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
2012-03-05* ext/psych/lib/psych/core_ext.rb: only extend Kernel if IRB is loadedtenderlove
in order to stop method pollution. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09* ext/psych/parser.c: removed external encoding setter, allow parsertenderlove
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
2012-01-18* ext/psych/lib/psych/visitors/to_ruby.rb: Added support for loadingtenderlove
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
2012-01-18* ext/psych/lib/psych/visitors/to_ruby.rb: Added ability to load arraytenderlove
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
2011-12-18* ext/psych/lib/psych/visitors/to_ruby.rb: BigDecimals can be restoredtenderlove
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
2011-12-18* ext/psych/lib/psych/scalar_scanner.rb: Strings that look like datestenderlove
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
2011-12-06* ext/psych/lib/psych.rb (module Psych): parse and load methods taketenderlove
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
2011-11-21* ext/psych/lib/psych.rb: remove autoload from psychtenderlove
* ext/psych/lib/psych/json.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08* ext/psych/lib/psych/tree_builder.rb: dump complex numbers,tenderlove
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
2011-11-07* ext/psych/lib/psych/scalar_scanner.rb: make sure strings that looktenderlove
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
2011-10-04* ext/psych/lib/psych/syntax_error.rb: Add file, line, offset, andtenderlove
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
2011-10-04* ext/psych/lib/psych/scalar_scanner.rb: use normal begin / rescuetenderlove
since postfix rescue cannot receive the exception class. Thanks nagachika! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03* ext/psych/lib/psych.rb: calling `yaml` rather than `to_yaml`.tenderlove
* 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
2011-10-03* ext/psych/lib/psych/scalar_scanner.rb: Match values against thetenderlove
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
2011-10-03* ext/psych/lib/psych/visitors/to_ruby.rb: ToRuby visitor can betenderlove
constructed with a ScalarScanner. * ext/psych/lib/psych/visitors/yaml_tree.rb: ScalarScanner can be passed to the YAMLTree visitor. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03* ext/psych/lib/psych/visitors/to_ruby.rb: Define Regexp::NOENCODINGtenderlove
for 1.9.2 backwards compatibility. * ext/psych/lib/psych/visitors/yaml_tree.rb: Fix Date string generation for 1.9.2 backwards compatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-01* ext/psych/lib/psych/visitors/yaml_tree.rb: emit strings tagged astenderlove
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
2011-08-24* ext/psych/lib/psych/nodes/node.rb: default `to_yaml` encoding to betenderlove
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
2011-08-13* ext/psych/lib/psych/core_ext.rb: Make Kernel#y private.tenderlove
[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
2011-08-13* ext/psych/lib/psych/scalar_scanner.rb: Only consider stringstenderlove
with fewer than 2 dots to be numbers. [ruby-core:38915] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-18* ext/psych/lib/psych.rb: define a new BadAlias error class.tenderlove
* 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
2011-06-21* ext/psych/lib/psych/visitors/to_ruby.rb: Fix cyclic references oftenderlove
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
2011-06-13* ext/psych/lib/psych/deprecated.rb (Object#to_yaml_properties):naruse
undef to_yaml_properties before redefine it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-09* ext/psych/lib/psych/visitors/to_ruby.rb: Hash subclasses can be readtenderlove
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
2011-06-09* ext/psych/lib/psych/visitors/to_ruby.rb: Ruby modules can be loadedtenderlove
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
2011-06-09* ext/psych/lib/psych/visitors/to_ruby.rb: Ruby classes can be loadedtenderlove
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
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-04fix capture to avoid doing a sub on the useconds when parsing datestenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-03* ext/psych/lib/psych/visitors/yaml_tree.rb: fix time dumping so thattenderlove
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
2011-03-09* ext/psych/lib/psych/visitors/yaml_tree.rb: Rescue exceptions whentenderlove
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
2011-02-25* ext/psych/lib/psych/scalar_scanner.rb: fix parsing timezone's whosetenderlove
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
2011-02-21* ext/psych/lib/psych/streaming.rb: refactor streaming methods to atenderlove
module. * ext/psych/lib/psych/stream.rb: extracted streaming specific methods to a module. * ext/psych/lib/psych/json/stream.rb: JSON stream inherits from JSONTree and includes streaming methods. * ext/psych/lib/psych/visitors/json_tree.rb: JSON does not support object references, so remove object reference testing when building JSON trees. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-21should have used anchor, not oidtenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-21* ext/psych/lib/psych/visitors/yaml_tree.rb (accept): use Hash#key?tenderlove
when looking up object references to err on the side of cache misses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-21* ext/psych/lib/psych/json/yaml_events.rb: refactoring JSON eventtenderlove
handling methods to a module for reuse. * ext/psych/lib/psych/json/tree_builder.rb: AST builder uses JSON event methods. * ext/psych/lib/psych/json/stream.rb: stream emitter uses JSON event methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-21* ext/psych/lib/psych/json/stream.rb: do not emit custom tags in mapstenderlove
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
2011-02-21* ext/psych/lib/psych/json/ruby_events.rb: DRY up ruby event handlingtenderlove
for JSON. * ext/psych/lib/psych/visitors/json_tree.rb: use ruby events module * ext/psych/lib/psych/json/stream.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-21* ext/psych/lib/psych/json/stream.rb: fix JSON stream emits to usetenderlove
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
2011-02-02* ext/psych/lib/psych/visitors/to_ruby.rb: use Regexp::NOENCODINGtenderlove
rather than magic number. * ext/syck/lib/syck/rubytypes.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e