uglifier 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of uglifier might be problematic. Click here for more details.

Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/uglify.js +7 -5
  3. data/uglifier.gemspec +2 -2
  4. metadata +17 -17
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
@@ -115,6 +115,7 @@ var KEYWORDS = array_to_hash([
115
115
  "catch",
116
116
  "const",
117
117
  "continue",
118
+ "debugger",
118
119
  "default",
119
120
  "delete",
120
121
  "do",
@@ -143,7 +144,6 @@ var RESERVED_WORDS = array_to_hash([
143
144
  "byte",
144
145
  "char",
145
146
  "class",
146
- "debugger",
147
147
  "double",
148
148
  "enum",
149
149
  "export",
@@ -1528,6 +1528,9 @@ function ast_walker() {
1528
1528
  "function": function(name, args, body) {
1529
1529
  return [ this[0], name, args.slice(), MAP(body, walk) ];
1530
1530
  },
1531
+ "debugger": function() {
1532
+ return [ this[0] ];
1533
+ },
1531
1534
  "defun": function(name, args, body) {
1532
1535
  return [ this[0], name, args.slice(), MAP(body, walk) ];
1533
1536
  },
@@ -2199,17 +2202,15 @@ function prepare_ifs(ast) {
2199
2202
 
2200
2203
  var conditional = walk(fi[1]);
2201
2204
 
2202
- var e_body = statements.slice(i + 1);
2205
+ var e_body = redo_if(statements.slice(i + 1));
2203
2206
  var e = e_body.length == 1 ? e_body[0] : [ "block", e_body ];
2204
2207
 
2205
- var ret = statements.slice(0, i).concat([ [
2208
+ return statements.slice(0, i).concat([ [
2206
2209
  fi[0], // "if"
2207
2210
  conditional, // conditional
2208
2211
  t, // then
2209
2212
  e // else
2210
2213
  ] ]);
2211
-
2212
- return redo_if(ret);
2213
2214
  }
2214
2215
 
2215
2216
  return statements;
@@ -2928,6 +2929,7 @@ function gen_code(ast, options) {
2928
2929
  "string": encode_string,
2929
2930
  "num": make_num,
2930
2931
  "name": make_name,
2932
+ "debugger": function(){ return "debugger" },
2931
2933
  "toplevel": function(statements) {
2932
2934
  return make_block_statements(statements)
2933
2935
  .join(newline + newline);
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "uglifier"
8
- s.version = "1.2.0"
8
+ s.version = "1.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ville Lautanala"]
12
- s.date = "2011-12-15"
12
+ s.date = "2011-12-26"
13
13
  s.email = "lautis@gmail.com"
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE.txt",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uglifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
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: 2011-12-15 00:00:00.000000000 Z
12
+ date: 2011-12-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: execjs
16
- requirement: &70272465546860 !ruby/object:Gem::Requirement
16
+ requirement: &70133427222100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70272465546860
24
+ version_requirements: *70133427222100
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: multi_json
27
- requirement: &70272465546300 !ruby/object:Gem::Requirement
27
+ requirement: &70133427218380 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70272465546300
35
+ version_requirements: *70133427218380
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70272465545280 !ruby/object:Gem::Requirement
38
+ requirement: &70133427310640 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '2.7'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70272465545280
46
+ version_requirements: *70133427310640
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &70272465544100 !ruby/object:Gem::Requirement
49
+ requirement: &70133427322320 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '1.0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70272465544100
57
+ version_requirements: *70133427322320
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: jeweler
60
- requirement: &70272465559500 !ruby/object:Gem::Requirement
60
+ requirement: &70133427320800 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.6.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70272465559500
68
+ version_requirements: *70133427320800
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rcov
71
- requirement: &70272465558480 !ruby/object:Gem::Requirement
71
+ requirement: &70133427318980 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70272465558480
79
+ version_requirements: *70133427318980
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rdoc
82
- requirement: &70272465557800 !ruby/object:Gem::Requirement
82
+ requirement: &70133427331540 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '3.11'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70272465557800
90
+ version_requirements: *70133427331540
91
91
  description:
92
92
  email: lautis@gmail.com
93
93
  executables: []
@@ -126,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  segments:
128
128
  - 0
129
- hash: 4489573816621195848
129
+ hash: -1948507962225552578
130
130
  required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  none: false
132
132
  requirements: