diff options
Diffstat (limited to 'ext/psych/lib/psych/deprecated.rb')
-rw-r--r-- | ext/psych/lib/psych/deprecated.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/psych/lib/psych/deprecated.rb b/ext/psych/lib/psych/deprecated.rb index 093f145302..fdff46845d 100644 --- a/ext/psych/lib/psych/deprecated.rb +++ b/ext/psych/lib/psych/deprecated.rb @@ -30,6 +30,12 @@ module Psych list.each(&block) end + def self.detect_implicit thing + warn "#{caller[0]}: detect_implicit is deprecated" if $VERBOSE + return '' unless String === thing + return 'null' if '' == thing + ScalarScanner.new.tokenize(thing).class.name.downcase + end end class Object |