Issue #3351 has been updated by Koichi Sasada.


Just now, we avoid this issue by putting `klass` into each frame.

However, the workaround is remaining.

Now, ancestors is here:

```
[B, Override, A, Override, Base, Object, Kernel, BasicObject]
```

and now MRI calls `Override#foo` only once. It skips second Override#foo.

```
override
bar
```

However, if there is a `A#foo`, then call `Override#foo` twice.

```
override
A
override
bar
```

It is ugly workaround. So I want to remove such skipping.

Matz: Can I call `Override#foo` twice even if it is duplicated with last call?


----------------------------------------
Bug #3351: stack overflow on super
https://bugs.ruby-lang.org/issues/3351#change-53225

* Author: Serge Balyuk
* Status: Open
* Priority: Normal
* Assignee: Koichi Sasada
* ruby -v: ruby 1.9.3dev (2010-05-26 trunk 28028) [i686-linux]
* Backport: 
----------------------------------------
It looks like `super` behavior is a bit different in 1.8 and 1.9. Please find the example below:

```ruby 
 class Base
   def foo
     puts "bar"
   end
 end
 
 module Override
   def foo
     puts "override"
     super
   end
 end
 
 
 class A < Base
 end
 
 class B < A
 end
 
 B.send(:include, Override)
 A.send(:include, Override)
 
 B.new.foo
 
 ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux] output:
 
 
 override
 override
 bar
```
 
 and ruby 1.9.3dev (2010-05-26 trunk 28028) [i686-linux] output:
 
```
 ....
 override
 override
 override
 override
 override
 super.rb:9: stack level too deep (SystemStackError)
```
 
Hope that helps.


---Files--------------------------------
super.rb (217 Bytes)


-- 
https://bugs.ruby-lang.org/