Project

General

Profile

Actions

Bug #1486

closed

DL::CParser#parse_struct_signature fails when argument is a String.

Bug #1486: DL::CParser#parse_struct_signature fails when argument is a String.

Added by ermaker (Minwoo Lee) almost 17 years ago. Updated almost 15 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.1p0
Backport:
[ruby-core:23494]

Description

=begin
the result of
parse_struct_signature('int a, int b')
and
parse_struct_signature(['int a', 'int b'])
should be same.

But, the implementation is like this.

if( signature.is_a?(String) )
signature = signature.split("\s*,\s*")
end

So the result of
parse_struct_signature(['int a', 'int b'])
is same to
parse_struct_signature("int a\s*,\sint b")

This code should be changed to
signature = signature.split(/\s*,\s*/)
=end


Files

dl_cparser_parse_struct_signature.patch (461 Bytes) dl_cparser_parse_struct_signature.patch ermaker (Minwoo Lee), 05/18/2009 10:42 PM
Actions

Also available in: PDF Atom