Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jan 17, 2015
  1. Nobuyoshi Nakada

    Fix anchor

    nobu authored
    Anchors like `\Z` are not valid inside character class.
    Use negative-lookahead instead.
  2. Nobuyoshi Nakada

    Fix assertion regexps

    nobu authored
    `|' is a meta character, so needs to be escaped.
Commits on Jan 13, 2015
  1. Jakub Jirutka

    Fix block chomping and add more tests

    jirutka authored
    When no [chomping indicator][1] is specified for a folded or literal
    block, then YAML parser should preserve the final line break (i.e. the
    string should end with \n). This implies that when dumping a string
    *without* the trailing newline to YAML, we should specify the stripping
    indicator (-).
Commits on Jan 12, 2015
  1. Jakub Jirutka

    Use appropriate style for serialized strings

    jirutka authored
    When psych parses YAML with string in the folded style as:
        a: >
    and serializes it back to YAML,
    then it renders the string in the literal style instead:
        a: |
          some inline content
    This patch fixes this behaviour. When a string doesn't contain newlines
    (blank line at the end is ignored) and it's not necessary to be quoted,
    then it will use plain style or folded style according to its length and
    the `line_width` option.
        # line_width = 100
        a: some inline content
        # line_width = 11
        a: >
          some inline
    This change was originally proposed by @Iazel.
Commits on Jan 8, 2015
  1. Merge branch 'master' into jirutka-patch-1

    * master: (21 commits)
      * ext/psych/lib/psych/visitors/to_ruby.rb: call `allocate` on hash subclasses.  Fixes
      * ext/psych/lib/psych/visitors/to_ruby.rb: revive hashes with ivars
      removed isolate task
      removed isolate plugin
      added minitest dependency into gemspec
      added install task into travis
      added ruby-head env
      bumping version to 2.0.8
      fixed build error caused by trunk changes
      bumping version to 2.0.7
      merging from ruby trunk
      backport r48512 from ruby/ruby trunk.
      Add changelog for 2a4d956
      backport r48214 from ruby/ruby trunk.
      Allow dumping any BasicObject that defines #marshal_dump or #marshal_load
      bumping version
      * ext/psych/lib/psych/visitors/yaml_tree.rb: fix NameError dumping and   loading. Fixes GH #85. Thanks @brentdax for the patch! * test/psych/test_exception.rb: test for fix
      * ext/psych/lib/psych/scalar_scanner.rb: fix loading strings that   look like integers but have a newline. Fixes GH #189 * test/psych/test_string.rb: test for fix
      * ext/psych/lib/psych/visitors/to_ruby.rb: merge keys with a hash   should merge the hash in to the parent. * test/psych/test_merge_keys.rb: test for change. Fixes GH #202
      * ext/psych/lib/psych/visitors/to_ruby.rb: quoted "<<" strings   should not be treated as merge keys. * ext/psych/lib/psych/visitors/yaml_tree.rb: hashes with keys   containing "<<" should roundtrip. * test/psych/test_merge_keys.rb: test for change. Fixes GH #203
Commits on Aug 29, 2014
  1. * ext/psych/lib/psych/scalar_scanner.rb: fix loading strings that

      look like integers but have a newline. Fixes GH #189
    * test/psych/test_string.rb: test for fix
    Fixes #189
Commits on Aug 16, 2014
  1. Jakub Jirutka
Commits on Feb 18, 2014
  1. SHIBATA Hiroshi

    remove unused variables

    hsbt authored
Commits on Jan 9, 2014
  1. * ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings with

      quotes should not have changed.  [ruby-core:59316] [Bug #9300]
    * ext/psych/lib/psych.rb: fixed missing require.
    * test/psych/test_string.rb: test
Commits on Oct 29, 2013
  1. * ext/psych/lib/psych/visitors/yaml_tree.rb: string subclasses should

      not be considered to be binary.  Fixes Psych / GH 166
    * test/psych/test_string.rb: test for fix
    Fixes #166
Commits on Sep 5, 2013
  1. * ext/psych/lib/psych/visitors/yaml_tree.rb: use double quotes when

      strings start with special characters.
      [Fixes GH-157] #157
    * test/psych/test_string.rb: test for change.
    Fixes #157
Commits on Aug 28, 2013
  1. * ext/psych/lib/psych/scalar_scanner.rb: invalid floats should be

      treated as strings.
      [Fixes GH-156] #156
    * test/psych/test_string.rb: test for change
    fixes #156
Commits on Apr 5, 2013
  1. * ext/psych/lib/psych/visitors/to_ruby.rb: correctly register

      self-referential strings. Fixes tenderlove/psych #135
    * test/psych/test_string.rb: appropriate test.
  2. sync with ruby trunk

Commits on Jan 9, 2013
  1. * ext/psych/lib/psych/scalar_scanner.rb: strip trailing dots from

      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
    fixes #109
Commits on Jan 6, 2013
  1. Paul Kunysch

    Testing 8bit ascii_only strings.

    pck authored
  2. Paul Kunysch
Commits on May 15, 2012
  1. * ext/psych/lib/psych/visitors/to_ruby.rb: fix a bug with string

      subclass dumping and loading.
    * test/psych/test_array.rb: pertinent tests
    * test/psych/test_string.rb: ditto
Commits on Jan 18, 2012
  1. * ext/psych/lib/psych/visitors/to_ruby.rb: Added support for loading

      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
Commits on Nov 7, 2011
  1. * ext/psych/lib/psych/scalar_scanner.rb: make sure strings that look

      like base 60 numbers are serialized as quoted strings.
    * test/psych/test_string.rb: test for change.
    Fixes #25
Commits on Sep 1, 2011
Commits on Mar 30, 2011
Commits on Mar 29, 2010
Commits on Mar 28, 2010
  1. removed the to_yaml method

Commits on Mar 27, 2010
Something went wrong with that request. Please try again.