rbjs 0.9.11 → 0.9.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/rbjs.rb +7 -9
  2. data/lib/rbjs/version.rb +1 -1
  3. metadata +1 -1
data/lib/rbjs.rb CHANGED
@@ -108,16 +108,14 @@ module Rbjs
108
108
  elsif arg.is_a?(Hash)
109
109
  '{'+arg.map{|key, val|to_argument(key)+': '+to_argument(val)}.join(',')+'}'
110
110
  elsif arg.is_a?(Proc)
111
- begin
112
- root = Root.new(@_view_context, &arg)
113
- function_parameters = []
114
- function_parameter_names = []
115
- for param in arg.parameters
116
- function_parameter_names << param[1]
117
- function_parameters << ArgumentProxy.new(root, param[1])
118
- end
119
- "function(#{function_parameter_names.join ', '}) {\n#{root.evaluate function_parameters}}"
111
+ root = Root.new(@_view_context, &arg)
112
+ function_parameters = []
113
+ function_parameter_names = []
114
+ for param in arg.parameters
115
+ function_parameter_names << param[1]
116
+ function_parameters << ArgumentProxy.new(root, param[1])
120
117
  end
118
+ "function(#{function_parameter_names.join ', '}) {\n#{root.evaluate function_parameters}}"
121
119
  else
122
120
  arg.to_json
123
121
  end
data/lib/rbjs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rbjs
2
- VERSION = "0.9.11"
2
+ VERSION = "0.9.12"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rbjs
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.11
5
+ version: 0.9.12
6
6
  platform: ruby
7
7
  authors:
8
8
  - Stefan Buhrmester