jsonrpc2.0 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/jsonrpc2.0.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'jsonrpc2.0'
3
- s.version = '0.1.5'
3
+ s.version = '0.1.6'
4
4
  s.summary = 'A server and client implementation of the JsonRpc 2.0 protocol.'
5
5
  s.authors = ['Jannik Theiß']
6
6
  s.email = 'dev@coldsun.org'
@@ -35,11 +35,13 @@ class JsonRpcServer
35
35
  raise InvalidRequest if (!inRequest.key?('method'))
36
36
 
37
37
  begin
38
- method = method('r_' + inRequest['method'])
39
-
40
- unless restrictMethod == nil or method == restrictMethod
38
+ methodName = 'r_' + inRequest['method']
39
+
40
+ unless restrictMethod == nil or restrictMethod == methodName
41
41
  raise MethodNotAllowed
42
42
  end
43
+
44
+ method = method(methodName)
43
45
 
44
46
  params = inRequest['params']
45
47
  result = method.call(*params)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonrpc2.0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: