summaryrefslogtreecommitdiff
path: root/ast.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ast.rb')
-rw-r--r--ast.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/ast.rb b/ast.rb
index c6a51bfd34..55ca6c2da1 100644
--- a/ast.rb
+++ b/ast.rb
@@ -32,7 +32,7 @@ class RubyVM
# RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:9>
def self.parse string
- __builtin.ast_s_parse string
+ Primitive.ast_s_parse string
end
# call-seq:
@@ -47,7 +47,7 @@ class RubyVM
# RubyVM::AbstractSyntaxTree.parse_file("my-app/app.rb")
# # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-31:3>
def self.parse_file pathname
- __builtin.ast_s_parse_file pathname
+ Primitive.ast_s_parse_file pathname
end
# call-seq:
@@ -66,7 +66,7 @@ class RubyVM
# RubyVM::AbstractSyntaxTree.of(method(:hello))
# # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-3:3>
def self.of body
- __builtin.ast_s_of body
+ Primitive.ast_s_of body
end
# RubyVM::AbstractSyntaxTree::Node instances are created by parse methods in
@@ -88,7 +88,7 @@ class RubyVM
# call = lasgn.children[1]
# call.type # => :OPCALL
def type
- __builtin.ast_node_type
+ Primitive.ast_node_type
end
# call-seq:
@@ -96,7 +96,7 @@ class RubyVM
#
# The line number in the source code where this AST's text began.
def first_lineno
- __builtin.ast_node_first_lineno
+ Primitive.ast_node_first_lineno
end
# call-seq:
@@ -104,7 +104,7 @@ class RubyVM
#
# The column number in the source code where this AST's text began.
def first_column
- __builtin.ast_node_first_column
+ Primitive.ast_node_first_column
end
# call-seq:
@@ -112,7 +112,7 @@ class RubyVM
#
# The line number in the source code where this AST's text ended.
def last_lineno
- __builtin.ast_node_last_lineno
+ Primitive.ast_node_last_lineno
end
# call-seq:
@@ -120,7 +120,7 @@ class RubyVM
#
# The column number in the source code where this AST's text ended.
def last_column
- __builtin.ast_node_last_column
+ Primitive.ast_node_last_column
end
# call-seq:
@@ -131,7 +131,7 @@ class RubyVM
#
# The returned array may contain other nodes or <code>nil</code>.
def children
- __builtin.ast_node_children
+ Primitive.ast_node_children
end
# call-seq:
@@ -139,7 +139,7 @@ class RubyVM
#
# Returns debugging information about this node as a string.
def inspect
- __builtin.ast_node_inspect
+ Primitive.ast_node_inspect
end
end
end