summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authorgit <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-06-23 01:47:40 +0900
committergit <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-06-23 01:47:40 +0900
commitc5c3486340b67b6f6f6f980f2c3fa76780561767 (patch)
treef810814dbf95d0e0f2420a930be994b1e54ba95d /variable.c
parentef524c13d96c645fd00c17267a553275adb0b106 (diff)
* expand tabs.
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/variable.c b/variable.c
index 9dc1a3052c..dc0166774e 100644
--- a/variable.c
+++ b/variable.c
@@ -2411,7 +2411,7 @@ rb_const_search_from(VALUE klass, ID id, int exclude, int recurse, int visibilit
rb_autoload_load(tmp, id);
continue;
}
- if (exclude && tmp == rb_cObject) {
+ if (exclude && tmp == rb_cObject) {
goto not_found;
}
return value;
@@ -2487,20 +2487,20 @@ static VALUE
rb_const_location_from(VALUE klass, ID id, int exclude, int recurse, int visibility)
{
while (RTEST(klass)) {
- rb_const_entry_t *ce;
+ rb_const_entry_t *ce;
- while ((ce = rb_const_lookup(klass, id))) {
- if (visibility && RB_CONST_PRIVATE_P(ce)) {
- return Qnil;
- }
- if (exclude && klass == rb_cObject) {
- goto not_found;
- }
- if (NIL_P(ce->file)) return rb_ary_new();
- return rb_assoc_new(ce->file, INT2NUM(ce->line));
- }
- if (!recurse) break;
- klass = RCLASS_SUPER(klass);
+ while ((ce = rb_const_lookup(klass, id))) {
+ if (visibility && RB_CONST_PRIVATE_P(ce)) {
+ return Qnil;
+ }
+ if (exclude && klass == rb_cObject) {
+ goto not_found;
+ }
+ if (NIL_P(ce->file)) return rb_ary_new();
+ return rb_assoc_new(ce->file, INT2NUM(ce->line));
+ }
+ if (!recurse) break;
+ klass = RCLASS_SUPER(klass);
}
not_found: