Skip to content

Commit 4a16dc5

Browse files
committed
only remove const if it is defined
1 parent 3bec8fa commit 4a16dc5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/syck.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
require File.expand_path('../yaml/engine_manager', __FILE__)
1212
else
1313
Object.class_eval <<-eorb, __FILE__, __LINE__ + 1
14-
remove_const 'YAML'
14+
remove_const 'YAML' if defined? YAML
1515
YAML = Syck
1616
remove_method :to_yaml
1717
alias :to_yaml :syck_to_yaml

0 commit comments

Comments
 (0)