summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-complex
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-06-20 12:07:49 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-06-20 12:07:49 +0900
commit2ffb77586a8ce6f325d2981e2ad88cc9e62ae39b (patch)
tree3453e32c72099030567adf0702b8c5313a20c23e /mrbgems/mruby-complex
parentdad99afae8076e0b78b995813da713b0deb73740 (diff)
downloadmruby-2ffb77586a8ce6f325d2981e2ad88cc9e62ae39b.tar.gz
mruby-2ffb77586a8ce6f325d2981e2ad88cc9e62ae39b.zip
Symbolify saved alias name to improve performance.
Diffstat (limited to 'mrbgems/mruby-complex')
-rw-r--r--mrbgems/mruby-complex/mrblib/complex.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-complex/mrblib/complex.rb b/mrbgems/mruby-complex/mrblib/complex.rb
index ea8530919..74c128a07 100644
--- a/mrbgems/mruby-complex/mrblib/complex.rb
+++ b/mrbgems/mruby-complex/mrblib/complex.rb
@@ -107,7 +107,7 @@ class Complex < Numeric
[Fixnum, Float].each do |cls|
[:+, :-, :*, :/, :==].each do |op|
cls.instance_eval do
- original_operator_name = "__original_operator_#{op}_complex"
+ original_operator_name = :"__original_operator_#{op}_complex"
alias_method original_operator_name, op
define_method op do |rhs|
if rhs.is_a? Complex