lib/irb/extend-command.rb in irb-1.2.7 vs lib/irb/extend-command.rb in irb-1.2.8
- old
+ new
@@ -123,10 +123,14 @@
[
:irb_info, :Info, "irb/cmd/info"
],
+ [
+ :measure, :Measure, "irb/cmd/measure"
+ ],
+
]
# Installs the default irb commands:
#
# +irb_current_working_workspace+:: Context#main
@@ -178,11 +182,11 @@
def #{cmd_name}_(\#{args})
ExtendCommand::#{cmd_class}.execute(irb_context, \#{args})
end
end
], nil, __FILE__, line
- send :#{cmd_name}_, *opts, &b
+ __send__ :#{cmd_name}_, *opts, &b
end
], nil, __FILE__, line
else
line = __LINE__; eval %[
def #{cmd_name}(*opts, &b)
@@ -266,11 +270,11 @@
def self.def_extend_command(cmd_name, load_file, *aliases)
line = __LINE__; Context.module_eval %[
def #{cmd_name}(*opts, &b)
Context.module_eval {remove_method(:#{cmd_name})}
require "#{load_file}"
- send :#{cmd_name}, *opts, &b
+ __send__ :#{cmd_name}, *opts, &b
end
for ali in aliases
alias_method ali, cmd_name
end
], __FILE__, line
@@ -289,12 +293,12 @@
alias_name = new_alias_name(base_method)
module_eval %[
alias_method alias_name, base_method
def #{base_method}(*opts)
- send :#{extend_method}, *opts
- send :#{alias_name}, *opts
+ __send__ :#{extend_method}, *opts
+ __send__ :#{alias_name}, *opts
end
]
end
# Extends the given +base_method+ with a postfix call to the given
@@ -305,11 +309,11 @@
alias_name = new_alias_name(base_method)
module_eval %[
alias_method alias_name, base_method
def #{base_method}(*opts)
- send :#{alias_name}, *opts
- send :#{extend_method}, *opts
+ __send__ :#{alias_name}, *opts
+ __send__ :#{extend_method}, *opts
end
]
end
# Returns a unique method name to use as an alias for the given +name+.