Skip to content

Commit

Permalink
* lib/psych.rb (Psych.load): Return value of Psych::SyntaxError.message
Browse files Browse the repository at this point in the history
  should be same as example. Patch by Ippei Obayashi [ruby-core:51193]
  • Loading branch information
Zachary Scott committed Jan 3, 2013
1 parent f22f976 commit 6a3ac11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/psych.rb
Expand Up @@ -123,7 +123,7 @@ class BadAlias < Exception
# Psych.load("--- `", "file.txt")
# rescue Psych::SyntaxError => ex
# ex.file # => 'file.txt'
# ex.message # => "(foo.txt): found character that cannot start any token"
# ex.message # => "(file.txt): found character that cannot start any token"
# end
def self.load yaml, filename = nil
result = parse(yaml, filename)
Expand All @@ -145,7 +145,7 @@ def self.load yaml, filename = nil
# Psych.parse("--- `", "file.txt")
# rescue Psych::SyntaxError => ex
# ex.file # => 'file.txt'
# ex.message # => "(foo.txt): found character that cannot start any token"
# ex.message # => "(file.txt): found character that cannot start any token"
# end
#
# See Psych::Nodes for more information about YAML AST.
Expand Down Expand Up @@ -195,7 +195,7 @@ def self.parser
# Psych.parse_stream("--- `", "file.txt")
# rescue Psych::SyntaxError => ex
# ex.file # => 'file.txt'
# ex.message # => "(foo.txt): found character that cannot start any token"
# ex.message # => "(file.txt): found character that cannot start any token"
# end
#
# See Psych::Nodes for more information about YAML AST.
Expand Down

0 comments on commit 6a3ac11

Please sign in to comment.