Created
February 14, 2014 04:43
-
-
Save haileys/8995941 to your computer and use it in GitHub Desktop.
turn top level constant references into exceptions rather than warnings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git variable.c variable.c | |
index d142255..27b1237 100644 | |
--- variable.c | |
+++ variable.c | |
@@ -1851,7 +1851,7 @@ rb_const_get_0(VALUE klass, ID id, int exclude, int recurse, int visibility) | |
continue; | |
} | |
if (exclude && tmp == rb_cObject && klass != rb_cObject) { | |
- rb_warn("toplevel constant %"PRIsVALUE" referenced by %"PRIsVALUE"::%"PRIsVALUE"", | |
+ rb_raise(rb_eNameError, "toplevel constant %"PRIsVALUE" referenced by %"PRIsVALUE"::%"PRIsVALUE"", | |
QUOTE_ID(id), rb_class_name(klass), QUOTE_ID(id)); | |
} | |
return value; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment