gobstones-code-runner 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bc71746c298f69d271810560054bbf5e7a90cb05bd87510d899f1f522a159e8
4
- data.tar.gz: 4f15c18f8b5550edfad79567d16264eb5db2f3a35704c70ec5379db4946fe037
3
+ metadata.gz: 00e926893b701c96e4706b32ee2f1d9f850d9ae7a32ee61533d21b6db240b155
4
+ data.tar.gz: e690df9447da83b1cfd7d4a8b566f989ae6492e1df04681906e211a0c5cc22ce
5
5
  SHA512:
6
- metadata.gz: 8308f12d46530c17158eab639542c91335bbaee26c7ad1ca4d1baac974d46e75b1dfa72fcdf07b23505f85db5f88b544aba6d8291898c6d619d1f07bbb07445e
7
- data.tar.gz: 18c0ce149c1fbc30b99edeb349d4b8492e0d9db9509913168bfe9b2d7bbea946e11ddb553c54902c8d75400f78bf7da1f8d8413db73d2e62b0ec15756de53725
6
+ metadata.gz: badee26de1446457ffa3f3ae8fb8c7b769c48759f205c10ac1420ef87e97e401271b33a83d63a18cfb6a4c5c044091c0951f73eff8c400a751be40b42ea0d3da
7
+ data.tar.gz: 8509e9852090bc30ccf8d30c7b35f2c16e0ffa4c542d3209e257a64adf98a8500098927b9ca9373b26587414e144909c24fae8103c948764c2a35d27bed76f9c
@@ -4174,8 +4174,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4174
4174
  }
4175
4175
 
4176
4176
  run({ ast, request, throttle, callbacks }) {
4177
- const { states, returnValue } = this._interpret(ast, request);
4178
- this._runWithThrottle(states, returnValue, throttle, callbacks);
4177
+ const { states, returnValue, actualReturnValue } = this._interpret(ast, request);
4178
+ this._runWithThrottle(states, { returnValue, actualReturnValue }, throttle, callbacks);
4179
4179
  }
4180
4180
 
4181
4181
  clear() {
@@ -4183,12 +4183,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4183
4183
  this.handles = [];
4184
4184
  }
4185
4185
 
4186
- _runWithThrottle(states, returnValue, throttle, { onResult, onStop, onReturnValue }) {
4186
+ _runWithThrottle(states, { returnValue, actualReturnValue }, throttle, { onResult, onStop, onReturnValue }) {
4187
4187
  const _onResult = (state) => onResult(state.board || state, state);
4188
4188
 
4189
4189
  const _onEnd = () => {
4190
4190
  onStop("end");
4191
- onReturnValue(returnValue);
4191
+ onReturnValue(returnValue, actualReturnValue);
4192
4192
  }
4193
4193
 
4194
4194
  if (throttle === 0) {
@@ -4216,7 +4216,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4216
4216
  var result = this.parser.interpret(ast.program, initialState);
4217
4217
  return {
4218
4218
  states: this._getStates(result, ast.teacher),
4219
- returnValue: result.returnValue
4219
+ returnValue: result.returnValue,
4220
+ actualReturnValue: result.actualReturnValue
4220
4221
  };
4221
4222
  } catch (e) {
4222
4223
  e.location = this.parser.getErrorLineAndMode(e, code);
@@ -1,5 +1,5 @@
1
1
  module Gobstones
2
2
  module CodeRunner
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gobstones-code-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Alfonso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-12 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler