Project

General

Profile

Actions

Bug #8496

closed

String#b does not check the code range properly

Added by knu (Akinori MUSHA) almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.1.0dev (2013-06-05 trunk 41090) [x86_64-freebsd9]
[ruby-core:55315]

Description

Currently "abc".b.ascii_only? returns false, which should be true.


Files

Updated by knu (Akinori MUSHA) almost 11 years ago

A patch is attached.

This problem also applies to ruby_2_0_0.

Updated by naruse (Yui NARUSE) almost 11 years ago

coderange_scan may cost too much time, so commit it with ENC_CODERANGE_CLEAR(str);.

Actions #3

Updated by knu (Akinori MUSHA) almost 11 years ago

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

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


  • string.c (String#b): Allow code range scan to happen later so
    ascii_only? on a result string returns the correct value.
    [ruby-core:55315] [Bug #8496]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0