summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych/visitors
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-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-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-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-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-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-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-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-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-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/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-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
2011-02-02* ext/psych/lib/psych/visitors/to_ruby.rb: ARG_ENCODING_NONE regulartenderlove
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
2011-01-22* ext/psych/lib/psych/visitors/to_ruby.rb: fixing merge key supporttenderlove
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
2011-01-22* ext/psych/lib/psych/visitors/to_ruby.rb: merge keys are actuallytenderlove
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
2011-01-21* ext/psych/lib/psych/nodes/node.rb: Make Psych::Nodes::Nodetenderlove
enumerable. * ext/psych/lib/psych/visitors/depth_first.rb: Add a depth-first visitor to enumerate over a YAML AST in a depth-first fashion * test/psych/nodes/test_enumerable.rb: test for enumerating nodes * test/psych/visitors/test_depth_first.rb: test for depth-first visitor git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-20* ext/psych/lib/psych/visitors/json_tree.rb: Fix JSON emit fortenderlove
DateTime and Time classes. * test/psych/test_json_tree.rb: test for JSON emit git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-19* ext/psych/lib/psych/coder.rb (represent_object): arbitrary objectstenderlove
may be passed to the Psych::Coder object. * ext/psych/lib/psych/visitors/yaml_tree.rb: support for visiting arbitrary objects set on the coder. * test/psych/test_coder.rb: supporting test case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-17* ext/psych/lib/psych/visitors/json_tree.rb (visit_String): JSONtenderlove
strings should be dumped with double quotes. [ruby-core:34186] * test/psych/test_json_tree.rb: test for double quotes git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05* ext/psych/lib/psych/visitors/yaml_tree.rb: use YAML 1.0 outputtenderlove
format for serializing nil values. Thanks Eric Hodel! * test/psych/test_nil.rb: test for nil values git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-02* ext/psych/lib/psych/visitors/visitor.rb (initialize): push accessortenderlove
methods to subclass that actually uses them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-02* ext/psych/lib/psych/visitors/visitor.rb (accept): switch totenderlove
a dispatch cache rather than case / when statement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-30* string.c (tr_setup_table): fix bug in r29146.naruse
Initialize table even if cflag is 0; tr_find see whether del is empty or not. * string.c (tr_find): nodel can't be NULL; if NULL, it means it is not specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-08* ext/psych/lib/psych/visitors/yaml_tree.rb (format_time): use newtenderlove
timezone format options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-08* ext/psych/lib/psych/visitors/emitter.rb (initialize): line_width istenderlove
a valid option passed to the emitter. * test/psych/test_psych.rb: corresponding tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-08* ext/psych/emitter.c (line_width, set_line_width): preferred line maytenderlove
be set on the emitter. * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto * test/psych/test_emitter.rb: corresponding tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07* ext/psych/lib/psych/visitors/yaml_tree.rb (push): adding versiontenderlove
and header emit options. * test/psych/test_psych.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07* ext/psych/lib/psych/visitors/emitter.rb: sending emit options totenderlove
YAML emitter. [ruby-core:28318] * ext/psych/emitter.c: updating documentation about emit options * ext/psych/lib/psych/core_ext.rb: ditto * ext/psych/lib/psych.rb (dump): passing emit options to emitter. * ext/psych/lib/psych/nodes/node.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-06* ext/psych/lib/psych/scalar_scanner.rb (parse_time): dealing withtenderlove
negative partial hour time zones. [ruby-core:31064] * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto * test/psych/visitors/test_to_ruby.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-05* ext/psych/lib/psych/visitors/yaml_tree.rb (format_time): nanosecondstenderlove
require more digits when dumping. Thanks akr! [ruby-core:31047] * test/psych/visitors/test_to_ruby.rb: adjusting tests for nanoseconds git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-05* ext/psych/lib/psych/scalar_scanner.rb (parse_string): supporttenderlove
timezones that are not one hour off. [ruby-core:31023] * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-03* ext/psych/lib/psych/visitors/to_ruby.rb(visit_Psych_Nodes_Scalar):tenderlove
teaching Psych to deserialize DateTime objects. [Bug #1390] * ext/psych/lib/psych/visitors/yaml_tree.rb(visit_DateTime): added a method for serializing DateTime objects. * ext/psych/lib/psych/scalar_scanner.rb(parse_time): add method for parsing times objects from a string. * test/psych/test_date_time.rb: tests for dumping DateTime objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-03* ext/psych/lib/psych/visitors/yaml_tree.rb (visit_Time): usetenderlove
Time#nsec to accurately serialize time objects. [ruby-core:29233] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-18* ext/psych/lib/psych/visitors/to_ruby.rb (resolve_klass): fix thetenderlove
exception message when attempting to load an unknown class. Thanks nobu! [ruby-dev:41399] * test/psych/test_psych.rb: test for the exception message git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-22* ext/psych/lib/psych/json/stream.rb: adding a JSON streaming APItenderlove
* ext/psych/lib/psych/stream.rb: ditto * ext/psych/lib/psych.rb: using autoload * ext/psych/lib/psych/json.rb: ditto * ext/psych/lib/psych/json/tree_builder.rb: refactor * ext/psych/lib/psych/visitors/json_tree.rb: refactor git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-20* ext/psych/lib/psych/stream.rb: adding YAML streaming API fortenderlove
infinite length streams. * ext/psych/lib/psych.rb: refactoring for streaming API * ext/psych/lib/psych/{handler, stream, tree_builder}.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e