js2 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,4 +1,7 @@
1
- ## Version 0.1.5
1
+ ## Version 0.1.7
2
+ * Support for Ruby 1.9.x
3
+
4
+ ## Version 0.1.6
2
5
  * Fixed RubyInline dependency
3
6
 
4
7
  ## Version 0.1.4
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- JS2_VERSION = '0.1.6'
5
+ JS2_VERSION = '0.1.7'
6
6
  Echoe.new('js2', JS2_VERSION) do |p|
7
7
  p.description = ""
8
8
  p.url = "http://github.com/jeffsu/js2"
data/js2.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{js2}
5
- s.version = "0.1.6"
5
+ s.version = "0.1.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Jeff Su"]
@@ -20,7 +20,7 @@ class JS2::Parser::Tokenizer
20
20
  int tokenize (int argc, VALUE *argv, VALUE self) {
21
21
  // convert ruby string to char*
22
22
  VALUE r_str = argv[0];
23
- int data_length = RSTRING(r_str)->len;
23
+ int data_length = #{RUBY_VERSION.match(/^1\.8/) ? "RSTRING(r_str)->len" : "RSTRING_LEN(r_str)"};
24
24
  char* data = STR2CSTR(r_str);
25
25
 
26
26
  int in_class = 0;
@@ -256,7 +256,7 @@ class JS2::Parser::Tokenizer
256
256
  int tokenize (int argc, VALUE *argv, VALUE self) {
257
257
  // convert ruby string to char*
258
258
  VALUE r_str = argv[0];
259
- int data_length = RSTRING(r_str)->len;
259
+ int data_length = #{RUBY_VERSION.match(/^1\.8/) ? "RSTRING(r_str)->len" : "RSTRING_LEN(r_str)"};
260
260
  char* data = STR2CSTR(r_str);
261
261
 
262
262
  int in_class = 0;
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 6
9
- version: 0.1.6
8
+ - 7
9
+ version: 0.1.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jeff Su