wirb 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ == 0.3.1
2
+ * Fix ;$., ;$", :$,
3
+
1
4
  == 0.3.0
2
5
  * Improve 1.9 enumerator detection/highlighting
3
6
  * Remove :open_enumerator / :close_enumerator (use nested usual base objects instead)
@@ -154,9 +154,12 @@ class << Wirb
154
154
  when :symbol
155
155
  case c
156
156
  when /"/
157
- pass[:symbol_prefix, ':']
158
- set_state[:symbol_string]
159
- @token = ''
157
+ if lc == '$' && llc == ':'
158
+ @token << c
159
+ else
160
+ pass[:symbol_prefix, ':']
161
+ set_state[:symbol_string]
162
+ end
160
163
  when /[^"., }\])=]/
161
164
  @token << c
162
165
  else
@@ -164,6 +167,8 @@ class << Wirb
164
167
  @token << c
165
168
  elsif c == '=' && nc != '>' # FIXME: spaceship error
166
169
  @token << c
170
+ elsif c =~ /[.,]/ && lc == '$' && llc == ':'
171
+ @token << c
167
172
  else
168
173
  pass[:symbol_prefix, ':']
169
174
  pass_state[:remove, :repeat]
@@ -1,3 +1,3 @@
1
1
  module Wirb
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  describe tokenizer(__FILE__) do
2
2
  after :each do check_value end
3
3
 
4
- please do check %w|a ab ab0 ab= < > * + <=> <= >= == =~ __send__ is_a? [] []= |.map(&:to_sym)
4
+ please do check %w|a ab ab0 ab= < > * + <=> <= >= == =~ __send__ is_a? [] []= $. $" $,|.map(&:to_sym)
5
5
  tokens.should == [
6
6
  [:open_array, "["],
7
7
  [:symbol_prefix, ":"],
@@ -72,6 +72,18 @@ describe tokenizer(__FILE__) do
72
72
  [:whitespace, " "],
73
73
  [:symbol_prefix, ":"],
74
74
  [:symbol, "[]="],
75
+ [:comma, ","],
76
+ [:whitespace, " "],
77
+ [:symbol_prefix, ":"],
78
+ [:symbol, "$."],
79
+ [:comma, ","],
80
+ [:whitespace, " "],
81
+ [:symbol_prefix, ":"],
82
+ [:symbol, "$\""],
83
+ [:comma, ","],
84
+ [:whitespace, " "],
85
+ [:symbol_prefix, ":"],
86
+ [:symbol, "$,"],
75
87
  [:close_array, "]"],
76
88
  ]
77
89
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: wirb
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.0
5
+ version: 0.3.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jan Lelis