ruby-changes:47488
From: naruse <ko1@a...>
Date: Wed, 16 Aug 2017 06:36:31 +0900 (JST)
Subject: [ruby-changes:47488] naruse:r59604 (trunk): suppress warning: assigned but unused variable - line
naruse 2017-08-16 06:36:16 +0900 (Wed, 16 Aug 2017) New Revision: 59604 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59604 Log: suppress warning: assigned but unused variable - line Modified files: trunk/test/readline/test_readline.rb trunk/vm.c trunk/vm_eval.c Index: vm.c =================================================================== --- vm.c (revision 59603) +++ vm.c (revision 59604) @@ -1006,6 +1006,10 @@ invoke_bmethod(rb_thread_t *th, const rb https://github.com/ruby/ruby/blob/trunk/vm.c#L1006 return ret; } +ALWAYS_INLINE(static inline VALUE +invoke_iseq_block_from_c(rb_thread_t *th, const struct rb_captured_block *captured, + VALUE self, int argc, const VALUE *argv, VALUE passed_block_handler, + const rb_cref_t *cref, int is_lambda)); static inline VALUE invoke_iseq_block_from_c(rb_thread_t *th, const struct rb_captured_block *captured, VALUE self, int argc, const VALUE *argv, VALUE passed_block_handler, @@ -1037,11 +1041,11 @@ invoke_iseq_block_from_c(rb_thread_t *th https://github.com/ruby/ruby/blob/trunk/vm.c#L1041 } } -static inline VALUE +ALWAYS_INLINE(static inline VALUE invoke_block_from_c_bh(rb_thread_t *th, VALUE block_handler, int argc, const VALUE *argv, VALUE passed_block_handler, const rb_cref_t *cref, - int is_lambda, int force_blockarg) + int is_lambda, int force_blockarg)) { again: switch (vm_block_handler_type(block_handler)) { Index: vm_eval.c =================================================================== --- vm_eval.c (revision 59603) +++ vm_eval.c (revision 59604) @@ -15,11 +15,11 @@ struct local_var_list { https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L15 VALUE tbl; }; -static inline VALUE method_missing(VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status); -static inline VALUE vm_yield_with_cref(rb_thread_t *th, int argc, const VALUE *argv, const rb_cref_t *cref, int is_lambda); -static inline VALUE vm_yield(rb_thread_t *th, int argc, const VALUE *argv); -static inline VALUE vm_yield_with_block(rb_thread_t *th, int argc, const VALUE *argv, VALUE block_handler); -static inline VALUE vm_yield_force_blockarg(rb_thread_t *th, VALUE args); +static __attribute__((always_inline)) VALUE method_missing(VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status); +static __attribute__((always_inline)) VALUE vm_yield_with_cref(rb_thread_t *th, int argc, const VALUE *argv, const rb_cref_t *cref, int is_lambda); +static __attribute__((always_inline)) VALUE vm_yield(rb_thread_t *th, int argc, const VALUE *argv); +static __attribute__((always_inline)) VALUE vm_yield_with_block(rb_thread_t *th, int argc, const VALUE *argv, VALUE block_handler); +static __attribute__((always_inline)) VALUE vm_yield_force_blockarg(rb_thread_t *th, VALUE args); static VALUE vm_exec(rb_thread_t *th); static void vm_set_eval_stack(rb_thread_t * th, const rb_iseq_t *iseq, const rb_cref_t *cref, const struct rb_block *base_block); static int vm_collect_local_variables_in_heap(rb_thread_t *th, const VALUE *dfp, const struct local_var_list *vars); @@ -959,7 +959,7 @@ rb_f_public_send(int argc, VALUE *argv, https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L959 /* yield */ -static inline VALUE +static __attribute__((always_inline)) VALUE rb_yield_0(int argc, const VALUE * argv) { return vm_yield(GET_THREAD(), argc, argv); Index: test/readline/test_readline.rb =================================================================== --- test/readline/test_readline.rb (revision 59603) +++ test/readline/test_readline.rb (revision 59604) @@ -100,7 +100,7 @@ class TestReadline < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L100 stdin.write("first second\t") stdin.flush Readline.completion_append_character = nil - line = replace_stdio(stdin.path, stdout.path) { + replace_stdio(stdin.path, stdout.path) { Readline.readline("> ", false) } assert_equal("second", actual_text) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/