Projects

Ticket #308 (closed defect: fixed)

Opened 3 years ago

Last modified 23 months ago

"too short multibyte code string" when using Pathname

Reported by: tjw@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.6
Component: MacRuby Keywords:
Cc:

Description

Possibly related, but simpler case of  https://www.macruby.org/trac/ticket/303

See the attached script, which hits a regex parse error when run.

Digging around, it looks like this might start from lib/pathname.rb in #initialize:

if /\0/ =~ @path

raise ArgumentError, "pathname contains \\0: #{@path.inspect}"

end

The /\0/ fails to parse and a RegexpError error is thrown.

Attachments

pathname_regex Download (150 bytes) - added by tjw@… 3 years ago.
Script to show problem.

Change History

Changed 3 years ago by tjw@…

Script to show problem.

Changed 3 years ago by tjw@…

I forgot to note, this is with r2267 on the trunk (recently re-copied from the LLVM experimental branch).

Changed 23 months ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.6

Seems to be fixed in trunk as of r3858.

$ ./miniruby  t.rb 
dn: .
pn .
$ ruby  t.rb 
dn: .
pn .
Note: See TracTickets for help on using tickets.