Skip to content

Commit e96d934

Browse files
committed
Fixing errors
1 parent 7ddd68e commit e96d934

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/symengine/complex.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module SymEngine
22
class Complex
33
def to_c
4-
self.to_s.sub('I', 'i').sub('*','').gsub(' ','').to_c
4+
to_s.tr('I', 'i').tr('*','').tr(' ','').to_c
55
end
66
end
77
end

spec/complex_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
describe SymEngine::Complex do
2-
context '#initialize' do
2+
context 'Convert to SymEngine types' do
33
context 'with a Complex' do
44
subject { SymEngine(Complex(2, 3)) }
55

spec/rational_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
describe SymEngine::Rational do
2-
context '#initialize' do
2+
context 'Convert to SymEngine types' do
33
context 'with a Rational' do
44
subject { SymEngine(Rational('2/3')) }
55

0 commit comments

Comments
 (0)