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
|
||||
|
||||
ReservedWords = [
|
||||
"BEGIN", "END",
|
||||
"alias", "and",
|
||||
"begin", "break",
|
||||
"case", "class",
|
||||
"def", "defined", "do",
|
||||
"else", "elsif", "end", "ensure",
|
||||
"false", "for",
|
||||
"if", "in",
|
||||
"module",
|
||||
"next", "nil", "not",
|
||||
"or",
|
||||
"redo", "rescue", "retry", "return",
|
||||
"self", "super",
|
||||
"then", "true",
|
||||
"undef", "unless", "until",
|
||||
"when", "while",
|
||||
"yield",
|
||||
]
|
||||
"BEGIN", "END",
|
||||
"alias", "and",
|
||||
"begin", "break",
|
||||
"case", "class",
|
||||
"def", "defined", "do",
|
||||
"else", "elsif", "end", "ensure",
|
||||
"false", "for",
|
||||
"if", "in",
|
||||
"module",
|
||||
"next", "nil", "not",
|
||||
"or",
|
||||
"redo", "rescue", "retry", "return",
|
||||
"self", "super",
|
||||
"then", "true",
|
||||
"undef", "unless", "until",
|
||||
"when", "while",
|
||||
"yield" ]
|
||||
|
||||
Operators = ["%", "&", "*", "**", "+", "-", "/",
|
||||
"<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>",
|
||||
"[]", "[]=", "^", "!", "!=", "!~"]
|
||||
Operators = [
|
||||
"%", "&", "*", "**", "+", "-", "/",
|
||||
"<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>",
|
||||
"[]", "[]=", "^", "!", "!=", "!~"
|
||||
]
|
||||
|
||||
# Return a new completion proc for use by Readline.
|
||||
# @param [Binding] target The current binding context.
|
||||
|
@ -188,13 +189,13 @@ class Pry
|
|||
|
||||
def self.select_message(receiver, message, candidates)
|
||||
candidates.grep(/^#{message}/).collect do |e|
|
||||
case e
|
||||
when /^[a-zA-Z_]/
|
||||
receiver + "." + e
|
||||
when /^[0-9]/
|
||||
when *Operators
|
||||
#receiver + " " + e
|
||||
end
|
||||
case e
|
||||
when /^[a-zA-Z_]/
|
||||
receiver + "." + e
|
||||
when /^[0-9]/
|
||||
when *Operators
|
||||
#receiver + " " + e
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue