Associated revisions

range.c (range_bsearch): fix some bugs: a documentation bug, a wrong
condition, missed break in switch/case, and workaround for GCC
optimization. See [ruby-core:49364] in detail. A great patch from
Heesob Park. [Bug #7352] [Feature #4766]

range.c (range_bsearch): fix some bugs: a documentation bug, a wrong
condition, missed break in switch/case, and workaround for GCC
optimization. See [ruby-core:49364] in detail. A great patch from
Heesob Park. [Bug #7352] [Feature #4766]

range.c (range_bsearch): fix some bugs: a documentation bug, a wrong
condition, missed break in switch/case, and workaround for GCC
optimization. See [ruby-core:49364] in detail. A great patch from
Heesob Park. [Bug #7352] [Feature #4766]

range.c (range_bsearch): fix some bugs: a documentation bug, a wrong
condition, missed break in switch/case, and workaround for GCC
optimization. See [ruby-core:49364] in detail. A great patch from
Heesob Park. [Bug #7352] [Feature #4766]

range.c (range_bsearch): fix some bugs: a documentation bug, a wrong
condition, missed break in switch/case, and workaround for GCC
optimization. See [ruby-core:49364] in detail. A great patch from
Heesob Park. [Bug #7352] [Feature #4766]

range.c (range_bsearch): fix some bugs: a documentation bug, a wrong
condition, missed break in switch/case, and workaround for GCC
optimization. See [ruby-core:49364] in detail. A great patch from
Heesob Park. [Bug #7352] [Feature #4766]

range.c (range_bsearch): fix some bugs: a documentation bug, a wrong
condition, missed break in switch/case, and workaround for GCC
optimization. See [ruby-core:49364] in detail. A great patch from
Heesob Park. [Bug #7352] [Feature #4766]

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

range.c (range_bsearch): fix some bugs: a documentation bug, a wrong
condition, missed break in switch/case, and workaround for GCC
optimization. See [ruby-core:49364] in detail. A great patch from
Heesob Park. [Bug #7352] [Feature #4766]

I guess this bug is related with the optimization of GCC 4.7.2.
The version built with VC 2010 or GCC 4.5.2 works fine.
The workaround is adding a volatile qualifier.

Additionally, I found some problems in Range#bsearch method.

I've committed your patch, my MEGA thanks!

I would really like you to have a commit bit. Are you willing?

Matz, what do you thing? He is a great all-round player; his
contribution to Ruby includes deadlock issues (his patches was
applied by kosaki), windows issues (accepted by usa and naruse),
algorithmic issue (accepted by mrkn and me), documentation
issues (by nobu), etc.