[ruby-core:74648] [Ruby trunk Bug#11932] Ripper.sexp can't parse some files from ruby repository and returns nil

From: naruse@...
Date: 2016-03-29 04:56:44 UTC
List: ruby-core #74648
Issue #11932 has been updated by Yui NARUSE.

Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE, 2.3: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE, 2.3: DONE

ruby_2_3 r54350 merged revision(s) 53411,53425.

----------------------------------------
Bug #11932: Ripper.sexp can't parse some files from ruby repository and returns nil
https://bugs.ruby-lang.org/issues/11932#change-57775

* Author: RadosナBw BuナBt
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.4.0dev (2015-12-31 trunk 53395) [x86_64-darwin15]
* Backport: 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE, 2.3: DONE
----------------------------------------
Test file bug.rb:

```ruby
require "ripper"

puts Dir['**/**.rb'].find_all { |f| Ripper.sexp(File.read(f)) == nil }
```

```
$ make runruby TESTRUN_SCRIPT=bug.rb
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems bug.rb
lib/net/imap.rb
lib/open-uri.rb
lib/rexml/text.rb
test/ruby/test_m17n.rb
test/ruby/test_regexp.rb
```

I didn't find any info in documentation anout returning nil so I assume this is not intended behavior.

---Files--------------------------------
bug.rb (90 Bytes)
reduced_imap.rb (132 Bytes)
reduced_m17n.rb (79 Bytes)
reduced_regexp.rb (42 Bytes)
reduced_open-uri.rb (95 Bytes)
reduced_text.rb (64 Bytes)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next