serializable_proc 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ === 0.4.1 (Sep 23, 2010)
2
+
3
+ * Fixed failure to capture @@_not_isolated_vars due to ParseTree's occasional
4
+ yielding of :cvasgn instead of :cvdecl [#ngty]
5
+
1
6
  === 0.4.0 (Sep 10, 2010)
2
7
 
3
8
  * code extraction is now delegated to more well-tested & robust sourcify [#ngty]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -68,10 +68,13 @@ class SerializableProc
68
68
 
69
69
  def isolatable_declarative(sexp)
70
70
  declaratives = []
71
- sexp.each_of_type(:cvdecl) do |node|
72
- next unless node.to_a[1] == ISOLATION_VAR
73
- node.each_of_type(:lit) {|_node| declaratives << _node.to_a[-1].to_s }
74
- break
71
+ [:cvdecl, :cvasgn].each do |type|
72
+ sexp.each_of_type(type) do |node|
73
+ next unless node.to_a[1] == ISOLATION_VAR
74
+ node.each_of_type(:lit) {|_node| declaratives << _node.to_a[-1].to_s }
75
+ break
76
+ end
77
+ break unless declaratives.empty?
75
78
  end
76
79
  declaratives
77
80
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{serializable_proc}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["NgTzeYang"]
12
- s.date = %q{2010-09-15}
12
+ s.date = %q{2010-09-23}
13
13
  s.description = %q{
14
14
  Give & take, serializing a ruby proc is possible, though not a perfect one (yet).
15
15
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serializable_proc
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - NgTzeYang
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-15 00:00:00 +08:00
18
+ date: 2010-09-23 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency