mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
cleaned up some indentation.. vim is good at this indenting stuff!
This commit is contained in:
parent
bffe9d69af
commit
60f164d8c4
1 changed files with 29 additions and 28 deletions
|
@ -14,28 +14,29 @@ class Pry
|
||||||
Readline.completion_append_character = nil
|
Readline.completion_append_character = nil
|
||||||
|
|
||||||
ReservedWords = [
|
ReservedWords = [
|
||||||
"BEGIN", "END",
|
"BEGIN", "END",
|
||||||
"alias", "and",
|
"alias", "and",
|
||||||
"begin", "break",
|
"begin", "break",
|
||||||
"case", "class",
|
"case", "class",
|
||||||
"def", "defined", "do",
|
"def", "defined", "do",
|
||||||
"else", "elsif", "end", "ensure",
|
"else", "elsif", "end", "ensure",
|
||||||
"false", "for",
|
"false", "for",
|
||||||
"if", "in",
|
"if", "in",
|
||||||
"module",
|
"module",
|
||||||
"next", "nil", "not",
|
"next", "nil", "not",
|
||||||
"or",
|
"or",
|
||||||
"redo", "rescue", "retry", "return",
|
"redo", "rescue", "retry", "return",
|
||||||
"self", "super",
|
"self", "super",
|
||||||
"then", "true",
|
"then", "true",
|
||||||
"undef", "unless", "until",
|
"undef", "unless", "until",
|
||||||
"when", "while",
|
"when", "while",
|
||||||
"yield",
|
"yield" ]
|
||||||
]
|
|
||||||
|
|
||||||
Operators = ["%", "&", "*", "**", "+", "-", "/",
|
Operators = [
|
||||||
"<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>",
|
"%", "&", "*", "**", "+", "-", "/",
|
||||||
"[]", "[]=", "^", "!", "!=", "!~"]
|
"<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>",
|
||||||
|
"[]", "[]=", "^", "!", "!=", "!~"
|
||||||
|
]
|
||||||
|
|
||||||
# Return a new completion proc for use by Readline.
|
# Return a new completion proc for use by Readline.
|
||||||
# @param [Binding] target The current binding context.
|
# @param [Binding] target The current binding context.
|
||||||
|
@ -188,13 +189,13 @@ class Pry
|
||||||
|
|
||||||
def self.select_message(receiver, message, candidates)
|
def self.select_message(receiver, message, candidates)
|
||||||
candidates.grep(/^#{message}/).collect do |e|
|
candidates.grep(/^#{message}/).collect do |e|
|
||||||
case e
|
case e
|
||||||
when /^[a-zA-Z_]/
|
when /^[a-zA-Z_]/
|
||||||
receiver + "." + e
|
receiver + "." + e
|
||||||
when /^[0-9]/
|
when /^[0-9]/
|
||||||
when *Operators
|
when *Operators
|
||||||
#receiver + " " + e
|
#receiver + " " + e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue