summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--class.c3
-rw-r--r--gc.c3
-rw-r--r--internal.h2
-rw-r--r--vm.c2
-rw-r--r--vm_method.c3
5 files changed, 8 insertions, 5 deletions
diff --git a/class.c b/class.c
index c07a204..5c7de85 100644
--- a/class.c
+++ b/class.c
@@ -241,7 +241,8 @@ rewrite_cref_stack(NODE *node, VALUE old_klass, VALUE new_klass)
if (node->nd_clss == old_klass) {
new_node = NEW_CREF(new_klass);
new_node->nd_next = node->nd_next;
- } else {
+ }
+ else {
new_node = NEW_CREF(node->nd_clss);
new_node->nd_next = rewrite_cref_stack(node->nd_next, old_klass, new_klass);
}
diff --git a/gc.c b/gc.c
index 8c7db09..e323a50 100644
--- a/gc.c
+++ b/gc.c
@@ -1255,7 +1255,8 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
if (RCLASS_EXT(obj)->subclasses) {
if (BUILTIN_TYPE(obj) == T_MODULE) {
rb_class_detach_module_subclasses(obj);
- } else {
+ }
+ else {
rb_class_detach_subclasses(obj);
}
RCLASS_EXT(obj)->subclasses = NULL;
diff --git a/internal.h b/internal.h
index 267ae5d..7d51334 100644
--- a/internal.h
+++ b/internal.h
@@ -635,7 +635,7 @@ void ruby_kill(rb_pid_t pid, int sig);
void Init_native_thread(void);
/* vm_insnhelper.h */
-vm_state_version_t rb_next_class_sequence();
+vm_state_version_t rb_next_class_sequence(void);
/* vm.c */
VALUE rb_obj_is_thread(VALUE obj);
diff --git a/vm.c b/vm.c
index 41e9542..3c50daa 100644
--- a/vm.c
+++ b/vm.c
@@ -88,7 +88,7 @@ static vm_state_version_t ruby_vm_sequence = 1;
#define PROCDEBUG 0
vm_state_version_t
-rb_next_class_sequence()
+rb_next_class_sequence(void)
{
return NEXT_CLASS_SEQUENCE();
}
diff --git a/vm_method.c b/vm_method.c
index b8b3b57..41064ad 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -42,7 +42,8 @@ rb_clear_cache_by_class(VALUE klass)
if (klass && klass != Qundef) {
if (klass == rb_cBasicObject || klass == rb_cObject || klass == rb_mKernel) {
INC_VM_STATE_VERSION();
- } else {
+ }
+ else {
rb_class_clear_method_cache(klass);
}
}