File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -298,10 +298,8 @@ rb_binding_alloc(VALUE klass)
298298 return obj ;
299299}
300300
301-
302- /* :nodoc: */
303301static VALUE
304- binding_dup (VALUE self )
302+ binding_copy (VALUE self )
305303{
306304 VALUE bindval = rb_binding_alloc (rb_cBinding );
307305 rb_binding_t * src , * dst ;
@@ -310,15 +308,21 @@ binding_dup(VALUE self)
310308 rb_vm_block_copy (bindval , & dst -> block , & src -> block );
311309 RB_OBJ_WRITE (bindval , & dst -> pathobj , src -> pathobj );
312310 dst -> first_lineno = src -> first_lineno ;
313- return rb_obj_dup_setup (self , bindval );
311+ return bindval ;
312+ }
313+
314+ /* :nodoc: */
315+ static VALUE
316+ binding_dup (VALUE self )
317+ {
318+ return rb_obj_dup_setup (self , binding_copy (self ));
314319}
315320
316321/* :nodoc: */
317322static VALUE
318323binding_clone (VALUE self )
319324{
320- VALUE bindval = binding_dup (self );
321- return rb_obj_clone_setup (self , bindval , Qnil );
325+ return rb_obj_clone_setup (self , binding_copy (self ), Qnil );
322326}
323327
324328VALUE
You can’t perform that action at this time.
0 commit comments