From: "zzak (Zachary Scott)" Date: 2012-12-30T02:24:34+09:00 Subject: [ruby-core:51195] [ruby-trunk - Bug #7636] Problems in the documnt of psych Issue #7636 has been updated by zzak (Zachary Scott). Assignee set to zzak (Zachary Scott) Target version set to 2.0.0 I'll have to check this upstream, psych is maintained on github (https://github.com/tenderlove/psych), but documentation patches here are fine. ---------------------------------------- Bug #7636: Problems in the documnt of psych https://bugs.ruby-lang.org/issues/7636#change-35147 Author: ohai (Ippei Obayashi) Status: Open Priority: Normal Assignee: zzak (Zachary Scott) Category: DOC Target version: 2.0.0 ruby -v: ruby 2.0.0dev (2012-12-01 trunk 38126) [x86_64-linux] I found some mistakes in the comment of psych library. The following is the comment of Psych.load: # Example: # # Psych.load("--- a") # => 'a' # Psych.load("---\n - a\n - b") # => ['a', 'b'] # # begin # Psych.load("--- `", "file.txt") # rescue Psych::SyntaxError => ex # ex.file # => 'file.txt' # ex.message # => "(foo.txt): found character that cannot start any token" # end The return value of ex.message is not correct. "foo.txt" should be "file.txt". We can find the same errros on some other methods. The attached patch fixes this problem. The patch also update the message for newer versions. -- http://bugs.ruby-lang.org/