Skip to content
Browse files

* lib/psych.rb (Psych.load): Return value of Psych::SyntaxError.message

  should be same as example. Patch by Ippei Obayashi [ruby-core:51193]
  • Loading branch information...
1 parent f22f976 commit 6a3ac11a78827f21054b2ec6492683d5b4db20e7 @zzak zzak committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/psych.rb
View
6 lib/psych.rb
@@ -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)
@@ -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.
@@ -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.

0 comments on commit 6a3ac11

Please sign in to comment.
Something went wrong with that request. Please try again.