Project

General

Profile

Bug #6750

Comment above rb_iseq_struct.local_size gives out of date description

Added by davidbalbert (David Albert) about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
2.0.0dev
Backport:
[ruby-core:46538]

Description

The description of rb_iseq_struct.local_size says that it is sizeof(local vars) + 1 for class and method frames, but just sizeof(local vars) for block frames. I think this is no longer the case. local_size is always sizeof(local vars) + 1.

Here's the relevant code from when the comment was written (2007): https://github.com/ruby/ruby/blob/71986ef6bc232455deca67017873fff0c3cbd860/compile.c#L5004-5010
And here's the code today: https://github.com/ruby/ruby/blob/trunk/compile.c#L5571

I've attached a patch that fixes the comment.


Files

Associated revisions

Revision d50bd493
Added by ko1 (Koichi Sasada) over 6 years ago

  • vm_core.h: modify a comment about rb_iseq_t::local_size. A patch by davidbalbert (David Albert) [Bug #6750]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 38936
Added by ko1 (Koichi Sasada) over 6 years ago

  • vm_core.h: modify a comment about rb_iseq_t::local_size. A patch by davidbalbert (David Albert) [Bug #6750]

Revision 38936
Added by ko1 (Koichi Sasada) over 6 years ago

  • vm_core.h: modify a comment about rb_iseq_t::local_size. A patch by davidbalbert (David Albert) [Bug #6750]

Revision 38936
Added by ko1 (Koichi Sasada) over 6 years ago

  • vm_core.h: modify a comment about rb_iseq_t::local_size. A patch by davidbalbert (David Albert) [Bug #6750]

Revision 38936
Added by ko1 (Koichi Sasada) over 6 years ago

  • vm_core.h: modify a comment about rb_iseq_t::local_size. A patch by davidbalbert (David Albert) [Bug #6750]

Revision 38936
Added by ko1 (Koichi Sasada) over 6 years ago

  • vm_core.h: modify a comment about rb_iseq_t::local_size. A patch by davidbalbert (David Albert) [Bug #6750]

Revision 38936
Added by ko1 (Koichi Sasada) over 6 years ago

  • vm_core.h: modify a comment about rb_iseq_t::local_size. A patch by davidbalbert (David Albert) [Bug #6750]

History

Updated by mame (Yusuke Endoh) almost 7 years ago

  • Status changed from Open to Assigned
  • Assignee set to ko1 (Koichi Sasada)

Thank you. Ko1, do you apply his patch? It is clearly benign.

--
Yusuke Endoh mame@tsg.ne.jp

#2

Updated by ko1 (Koichi Sasada) over 6 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r38936.
David, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • vm_core.h: modify a comment about rb_iseq_t::local_size. A patch by davidbalbert (David Albert) [Bug #6750]

Updated by ko1 (Koichi Sasada) over 6 years ago

I'm sorry I missed this issue (because no "target version". sorry again).
I applied it.

Thanks!

Also available in: Atom PDF