Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

try the short way first

  • Loading branch information...
commit c7c3ef0c942bfd153abd66bd02dcee6b6d342d78 1 parent a7e446b
@rdp authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/arguments/vm.rb
View
3  lib/arguments/vm.rb
@@ -15,8 +15,9 @@ def parse str, file = "(string)"
def self.ast_for_method klass, method
source, line = klass.instance_method(method).source_location
strs = []
- strs << IO.readlines( source )[ (line-1)..-1 ].join # whole file
strs << IO.readlines( source )[ (line-1)..(line+5) ].join # +5 necessary to parse http://github.com/rdp/p2pwebclient/blob/9539a7f01c761da95081f3121097c368d64fc70a/src/lib/block_manager.rb -- nobody would want a method def. > 5 anyway, right?
+ strs << IO.readlines( source )[ (line-1)..-1 ].join # whole file
+
for str in strs
ast = PermissiveRubyParser.new.parse( str )
if ast
Please sign in to comment.
Something went wrong with that request. Please try again.