Sha256: a7379b1b6da6b7afdfd88eccd3e3dbac19604bf2b81e597d901145b2209806db

Contents?: true

Size: 730 Bytes

Versions: 2

Compression:

Stored size: 730 Bytes

Contents

class Rubinius CompiledMethod {
  forwards_unary_ruby_methods

  def selectors_with_args {
    local_names = local_names to_a
    if: (required_args > 0) then: {
      name to_s split: ":" . map_with_index: |sel i| {
        "#{sel}: #{local_names[i]}"
      } . join: " "
    } else: {
      name to_s rest
    }
  }

  def definition_line {
    # don't use documentation#to_s since we need original docstring as written in source file to calculate the correct lines#
    docstring = ""
    if: documentation then: {
      docstring = documentation docs join: "\n"
    }
    if: (lines size > 3) then: {
      lines[3] - (docstring lines size)
    } else: {
      0 # UNKNOWN?
    }
  }

  def last_line {
    defined_line
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fancy-0.9.0 lib/rbx/compiled_method.fy
fancy-0.8.0 lib/rbx/compiled_method.fy