summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proc.c1
-rw-r--r--test/ruby/test_method.rb5
-rw-r--r--version.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/proc.c b/proc.c
index 9dbc78ae4a..0e0d3d6508 100644
--- a/proc.c
+++ b/proc.c
@@ -2720,6 +2720,7 @@ method_super_method(VALUE method)
TypedData_Get_Struct(method, struct METHOD, &method_data_type, data);
iclass = data->iclass;
+ if (!iclass) return Qnil;
super_class = RCLASS_SUPER(RCLASS_ORIGIN(iclass));
mid = data->me->called_id;
if (!super_class) return Qnil;
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index e016662375..0ef913fd78 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -926,6 +926,11 @@ class TestMethod < Test::Unit::TestCase
assert_equal(m1.source_location, m2.source_location, bug)
end
+ def test_super_method_after_bind
+ assert_nil String.instance_method(:length).bind(String.new).super_method,
+ '[ruby-core:85231] [Bug #14421]'
+ end
+
def rest_parameter(*rest)
rest
end
diff --git a/version.h b/version.h
index 5736a50a75..dea01d82cd 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.5.0"
#define RUBY_RELEASE_DATE "2018-02-21"
-#define RUBY_PATCHLEVEL 25
+#define RUBY_PATCHLEVEL 26
#define RUBY_RELEASE_YEAR 2018
#define RUBY_RELEASE_MONTH 2