swissparser 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG.rdoc +5 -0
  2. data/README.rdoc +12 -3
  3. data/lib/swissparser.rb +21 -18
  4. metadata +1 -1
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.8.1 / 2009-11-14
2
+
3
+ * 1 bugfix:
4
+ - made compatible with ruby 1.9.
5
+
1
6
  == 0.8.0 / 2009-11-14
2
7
 
3
8
  * 1 new feature:
data/README.rdoc CHANGED
@@ -20,10 +20,17 @@ be stable enough to be used for bioinformatics research.
20
20
 
21
21
  See tutorials: http://wiki.github.com/paradigmatic/SwissParser
22
22
 
23
-
24
23
  == REQUIREMENTS:
25
24
 
26
- Only pure standard ruby. Tested with version 1.8.7 only but should work with JRuby and others.
25
+ SwissParser uses only pure standard ruby.
26
+
27
+ Thanks to multiruby it was successfuly tested with
28
+ versions:
29
+
30
+ * 1.9.1-p243
31
+ * 1.8.7-p174
32
+ * 1.8.6-p383
33
+ * jruby-bin-1.3.1
27
34
 
28
35
  If you want to participate in SwissParser developpement, you will need the gem *bones*.
29
36
 
@@ -53,5 +60,7 @@ version you can clone the project with git:
53
60
 
54
61
  == LICENSE:
55
62
 
56
- Distributed under GPLv3. See the included LICENSE file for details.
63
+ Free and open software distributed under GPLv3.
64
+
65
+ See the included LICENSE file for details.
57
66
 
data/lib/swissparser.rb CHANGED
@@ -19,7 +19,7 @@ along with SwissParser. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  module Swiss
21
21
 
22
- VERSION = "0.8.0"
22
+ VERSION = "0.8.1"
23
23
 
24
24
  # This class defines parsing rules. Its methods
25
25
  # are accessible within the +rules+ section of
@@ -77,24 +77,27 @@ module Swiss
77
77
 
78
78
  include InstanceExecHelper
79
79
 
80
- #Used to execute rules and action using the ParsingContext as context
81
- #Stolen from http://eigenclass.org/hiki/bounded+space+instance_exec
82
- def instance_exec(*args, &block)
83
- begin
84
- old_critical, Thread.critical = Thread.critical, true
85
- n = 0
86
- n += 1 while respond_to?(mname="__instance_exec#{n}")
87
- InstanceExecHelper.module_eval{ define_method(mname, &block) }
88
- ensure
89
- Thread.critical = old_critical
90
- end
91
- begin
92
- ret = send(mname, *args)
93
- ensure
94
- InstanceExecHelper.module_eval{ remove_method(mname) } rescue nil
80
+ #Method instance_exec exists since version 1.9
81
+ if RUBY_VERSION < "1.9"
82
+ #Used to execute rules and action using the ParsingContext as context
83
+ #Stolen from http://eigenclass.org/hiki/bounded+space+instance_exec
84
+ def instance_exec(*args, &block)
85
+ begin
86
+ old_critical, Thread.critical = Thread.critical, true
87
+ n = 0
88
+ n += 1 while respond_to?(mname="__instance_exec#{n}")
89
+ InstanceExecHelper.module_eval{ define_method(mname, &block) }
90
+ ensure
91
+ Thread.critical = old_critical
92
+ end
93
+ begin
94
+ ret = send(mname, *args)
95
+ ensure
96
+ InstanceExecHelper.module_eval{ remove_method(mname) } rescue nil
97
+ end
98
+ ret
95
99
  end
96
- ret
97
- end
100
+ end
98
101
 
99
102
  end
100
103
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swissparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - paradigmatic