rubymotionlisp 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rubylisp/function.rb +5 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1de2f26e9bafee531ed317c6587a690ca142e1d
4
- data.tar.gz: 660e06658d5815c777a38489d0d4ae2f69418b52
3
+ metadata.gz: 490db605233e6a3d1bae6cf46d8e1409b40a574f
4
+ data.tar.gz: e824c1b27bc82ef51da8e3eeb5361afba60b22e8
5
5
  SHA512:
6
- metadata.gz: bab4310f94c76f0f16984e17dd31ee668c94d1ca422b6faa8677bfa092c35988eb309364f12e5c0cb361312be2b4941536742773e1af57363ac33a17e3660805
7
- data.tar.gz: f3bc077426877f9e009f78896c16d3c09d248fd9dc60dae0bc1658c10bc918279526d0c364ed09a07ac338ca37ba0c9350d59b8fc707607e993cbd9c78b46813
6
+ metadata.gz: fb3ccd4f6c3303ced67a6b5d952560019938644e0234db70ccfaf5d959f4ba2a4e75eb6608a1e8b2e647d5c34968232b69fff7c1f50b8159b75b2611b3d65ee7
7
+ data.tar.gz: cb6574334fac4294650d0d9ceaed4e878e7e42d103570005018e8727719f2fbe51d9bf00aa7c3fd4b73e1899685bbe315c6556213058f69ed40dcbc3df331e40
@@ -2,18 +2,18 @@ module Lisp
2
2
 
3
3
  class Function < Atom
4
4
 
5
- attr_reader :doc, :required_argument_count
5
+ attr_reader :doc, :arity
6
6
 
7
7
  def compute_required_argument_count(args)
8
8
  a = args
9
- @required_argument_count = 0
9
+ @arity = 0
10
10
  @var_args = false
11
11
  while a
12
12
  if a.symbol?
13
13
  @var_args = true
14
14
  return
15
15
  else
16
- @required_argument_count += 1
16
+ @arity += 1
17
17
  end
18
18
  a = a.cdr
19
19
  end
@@ -35,9 +35,9 @@ module Lisp
35
35
 
36
36
  def internal_apply_to(parameters, env, should_eval)
37
37
  if @var_args
38
- raise "#{@name} expected at least #{@required_argument_count} parameters, received #{parameters.length}." if parameters.length < @required_argument_count
38
+ raise "#{@name} expected at least #{@arity} parameters, received #{parameters.length}." if parameters.length < @arity
39
39
  else
40
- raise "#{@name} expected #{@required_argument_count} parameters, received #{parameters.length}." unless parameters.length == @required_argument_count
40
+ raise "#{@name} expected #{@arity} parameters, received #{parameters.length}." unless parameters.length == @arity
41
41
  end
42
42
 
43
43
  local_env = EnvironmentFrame.extending(@env, env.frame)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubymotionlisp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Astels
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-29 00:00:00.000000000 Z
11
+ date: 2014-09-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: An embeddable Lisp as an extension language for RubyMotion
14
14
  email: dastels@icloud.com