diff --git a/bindings/ruby/rhash.c b/bindings/ruby/rhash.c index 8be8a232..36cf06ee 100644 --- a/bindings/ruby/rhash.c +++ b/bindings/ruby/rhash.c @@ -37,20 +37,23 @@ static VALUE rh_update(VALUE self, VALUE msg) { Data_Get_Struct(self, struct rhash_context, ctx); if (TYPE(msg) != T_STRING) { - msg = rb_obj_as_string(msg); // convert to string + msg = rb_obj_as_string(msg); /* convert to string */ } rhash_update(ctx, RSTRING_PTR(msg), RSTRING_LEN(msg)); return self; } +/* declaring non-static method to fix a warning on an unused function */ +VALUE rh_update_file(VALUE self, VALUE file); + /** * call-seq: * rhash.update_file(filename) -> RHash * * Updates this RHash with data from given file. */ -static VALUE rh_update_file(VALUE self, VALUE file) { +VALUE rh_update_file(VALUE self, VALUE file) { // this function is actually implemented in pure Ruby below // this allows us to handle files in platform-independent way return self;