summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gc.c11
-rw-r--r--version.h2
2 files changed, 9 insertions, 4 deletions
diff --git a/gc.c b/gc.c
index 987bea907f..21ad919575 100644
--- a/gc.c
+++ b/gc.c
@@ -9207,11 +9207,12 @@ method_type_name(rb_method_type_t type)
static void
rb_raw_iseq_info(char *buff, const int buff_size, const rb_iseq_t *iseq)
{
- if (iseq->body->location.label) {
+ if (iseq->body && iseq->body->location.label) {
+ VALUE n = iseq->body->location.first_lineno;
snprintf(buff, buff_size, "%s %s@%s:%d", buff,
RSTRING_PTR(iseq->body->location.label),
RSTRING_PTR(iseq->body->location.path),
- FIX2INT(iseq->body->location.first_lineno));
+ n ? FIX2INT(n) : 0 );
}
}
@@ -9282,8 +9283,12 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
break;
}
case T_DATA: {
+ const struct rb_block *block;
const rb_iseq_t *iseq;
- if (rb_obj_is_proc(obj) && (iseq = vm_proc_iseq(obj)) != NULL) {
+ if (rb_obj_is_proc(obj) &&
+ (block = vm_proc_block(obj)) != NULL &&
+ (vm_block_type(block) == block_type_iseq) &&
+ (iseq = vm_block_iseq(block)) != NULL) {
rb_raw_iseq_info(buff, buff_size, iseq);
}
else {
diff --git a/version.h b/version.h
index 4a96d5f229..83f6e0e555 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.4.4"
#define RUBY_RELEASE_DATE "2018-03-20"
-#define RUBY_PATCHLEVEL 272
+#define RUBY_PATCHLEVEL 273
#define RUBY_RELEASE_YEAR 2018
#define RUBY_RELEASE_MONTH 3