@@ -297,8 +297,8 @@ def index_iseq(iseq, file_comments)
297297 find_constant_path ( insns , index - 1 )
298298
299299 if superclass . empty?
300- raise NotImplementedError ,
301- "superclass with non constant path on line #{ line } "
300+ warn ( "superclass with non constant path on line #{ line } " )
301+ next
302302 end
303303 end
304304
@@ -316,8 +316,8 @@ def index_iseq(iseq, file_comments)
316316 # defined on self. We could, but it would require more
317317 # emulation.
318318 if insns [ index - 2 ] != [ :putself ]
319- raise NotImplementedError ,
320- "singleton class with non-self receiver"
319+ warn ( "singleton class with non-self receiver" )
320+ next
321321 end
322322 elsif flags & VM_DEFINECLASS_TYPE_MODULE > 0
323323 location = location_for ( class_iseq )
@@ -344,8 +344,8 @@ def index_iseq(iseq, file_comments)
344344 results << method_definition ( current_nesting , insn [ 1 ] , location , file_comments )
345345 when :definesmethod
346346 if insns [ index - 1 ] != [ :putself ]
347- raise NotImplementedError ,
348- "singleton method with non-self receiver"
347+ warn ( "singleton method with non-self receiver" )
348+ next
349349 end
350350
351351 location = location_for ( insn [ 2 ] )
@@ -362,7 +362,7 @@ def index_iseq(iseq, file_comments)
362362 _ , nesting = find_constant_path ( insns , index - 1 )
363363 next_nesting << nesting if nesting . any?
364364
365- location = Location . new ( line , 0 )
365+ location = Location . new ( line , :unknown )
366366 results << ConstantDefinition . new (
367367 next_nesting ,
368368 name ,
@@ -375,7 +375,7 @@ def index_iseq(iseq, file_comments)
375375 names = find_attr_arguments ( insns , index )
376376 next unless names
377377
378- location = Location . new ( line , 0 )
378+ location = Location . new ( line , :unknown )
379379 names . each do |name |
380380 if insn [ 1 ] [ :mid ] != :attr_writer
381381 results << method_definition ( current_nesting , name , location , file_comments )
@@ -394,7 +394,7 @@ def index_iseq(iseq, file_comments)
394394
395395 # Now that we know it's in the structure we want it, we can use
396396 # the values of the putobject to determine the alias.
397- location = Location . new ( line , 0 )
397+ location = Location . new ( line , :unknown )
398398 results << AliasMethodDefinition . new (
399399 current_nesting ,
400400 insns [ index - 2 ] [ 1 ] ,
0 commit comments