less 2.0.11 → 2.0.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/less/parser.rb +15 -3
  2. data/lib/less/version.rb +1 -1
  3. metadata +12 -12
data/lib/less/parser.rb CHANGED
@@ -61,13 +61,25 @@ module Less
61
61
  # @return [Less::Tree] the parsed tree
62
62
  def parse(less)
63
63
  calljs do
64
- error,tree = nil
65
- @parser.parse(less, lambda {|e, t|
66
- error = e; tree = t
64
+ tree = nil
65
+ @parser.parse(less, lambda {|*args|
66
+ if passes_this_argument?
67
+ this, e, t = *args
68
+ else
69
+ e, t = *args
70
+ end
71
+ fail e.message unless e.nil?
72
+ tree = t
67
73
  })
68
74
  Tree.new(tree) if tree
69
75
  end
70
76
  end
77
+
78
+ private
79
+
80
+ def passes_this_argument?
81
+ defined? V8::Context::passes_this_argument?
82
+ end
71
83
  end
72
84
 
73
85
  # Abstract LessCSS syntax tree Less. Mainly used to emit CSS
data/lib/less/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Less
2
- VERSION = '2.0.11'
2
+ VERSION = '2.0.12'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: less
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.11
4
+ version: 2.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-14 00:00:00.000000000 Z
12
+ date: 2012-03-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: therubyracer
16
- requirement: &2152292600 !ruby/object:Gem::Requirement
16
+ requirement: &2156254740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.9.9
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2152292600
24
+ version_requirements: *2156254740
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: commonjs
27
- requirement: &2152336920 !ruby/object:Gem::Requirement
27
+ requirement: &2152384980 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.2.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2152336920
35
+ version_requirements: *2152384980
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &2152348120 !ruby/object:Gem::Requirement
38
+ requirement: &2152375420 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2152348120
46
+ version_requirements: *2152375420
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &2152381220 !ruby/object:Gem::Requirement
49
+ requirement: &2152372920 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '2.0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *2152381220
57
+ version_requirements: *2152372920
58
58
  description: Invoke the Less CSS compiler from Ruby
59
59
  email:
60
60
  - cowboyd@thefrontside.net
@@ -356,7 +356,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
356
356
  version: '0'
357
357
  segments:
358
358
  - 0
359
- hash: -4502537437615116696
359
+ hash: 1112777596548619802
360
360
  required_rubygems_version: !ruby/object:Gem::Requirement
361
361
  none: false
362
362
  requirements:
@@ -365,7 +365,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
365
365
  version: '0'
366
366
  segments:
367
367
  - 0
368
- hash: -4502537437615116696
368
+ hash: 1112777596548619802
369
369
  requirements: []
370
370
  rubyforge_project: less
371
371
  rubygems_version: 1.8.17