summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-07 17:47:56 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-07 17:47:56 +0000
commit531eab2cdc11ee90f681cfa7d014fa156f41dace (patch)
tree6bfa7110d882afe90da74313e5380a0d85d23431 /struct.c
parenteda22a34116e7c889cc0f7f4a5aaa1f59dc5495b (diff)
* struct.c (rb_struct_s_members): should raise TypeError instead
of call rb_bug(). [ruby-dev:31709] * marshal.c (r_object0): no nil check require any more. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index f1d94945fc..f87b33b050 100644
--- a/struct.c
+++ b/struct.c
@@ -37,7 +37,7 @@ rb_struct_s_members(VALUE klass)
VALUE members = rb_struct_iv_get(klass, "__members__");
if (NIL_P(members)) {
- rb_bug("non-initialized struct");
+ rb_raise(rb_eTypeError, "uninitialized struct");
}
return members;
}