diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-30 07:58:11 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-30 07:58:11 +0900 |
| commit | f3279b41e6441f9b4032cad79d984218cf47703d (patch) | |
| tree | 6487323548383fa942732865e1f4e1bf7fd8688c /src/variable.c | |
| parent | 5f7cdecdc9cf15293403955997e6e57ec94321a0 (diff) | |
| download | mruby-f3279b41e6441f9b4032cad79d984218cf47703d.tar.gz mruby-f3279b41e6441f9b4032cad79d984218cf47703d.zip | |
Stop infinite recursion in `Class#to_s`; fix #3861
Diffstat (limited to 'src/variable.c')
| -rw-r--r-- | src/variable.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/variable.c b/src/variable.c index 93fe8aba9..f0bfa19cc 100644 --- a/src/variable.c +++ b/src/variable.c @@ -948,6 +948,7 @@ find_class_sym(mrb_state *mrb, struct RClass *outer, struct RClass *c) struct csym_arg arg; if (!outer) return 0; + if (outer == c) return 0; arg.c = c; arg.sym = 0; iv_foreach(mrb, outer->iv, csym_i, &arg); |
