math_engine 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/context.rb +2 -2
  2. metadata +2 -2
@@ -29,7 +29,7 @@ class MathEngine
29
29
  def call(function_name, *args)
30
30
  library = library_for_function(function_name)
31
31
  raise UnknownFunctionError.new(function_name) unless library
32
- library.send(function_name, *args)
32
+ library.send(function_name.to_sym, *args)
33
33
  end
34
34
 
35
35
  def include_library(library)
@@ -57,7 +57,7 @@ class MathEngine
57
57
  end
58
58
 
59
59
  def library_for_function(function_name)
60
- @libraries.detect { |l| l.methods.include? function_name.to_sym }
60
+ @libraries.detect { |l| l.respond_to?(function_name.to_sym) }
61
61
  end
62
62
  end
63
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: math_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -75,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  segments:
77
77
  - 0
78
- hash: -1830500672750923633
78
+ hash: 2720302256799733350
79
79
  required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  none: false
81
81
  requirements: