rouge-lang 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/boot.rg CHANGED
@@ -358,6 +358,11 @@
358
358
  (defn re-pattern [s]
359
359
  (.compile Regexp s))
360
360
 
361
+ (defn sort-by [keyfn coll]
362
+ (-> coll
363
+ .to_a
364
+ (.sort_by | keyfn)))
365
+
361
366
  (ns rouge.test
362
367
  (:use rouge.core ruby))
363
368
 
data/lib/rouge/reader.rb CHANGED
@@ -404,7 +404,11 @@ class Rouge::Reader
404
404
 
405
405
  def read_number s
406
406
  if NUMBER.match s
407
- eval s
407
+ if s =~ /[.eE]/
408
+ Float(s)
409
+ else
410
+ Integer(s)
411
+ end
408
412
  else
409
413
  reader_raise UnexpectedCharacterError, "#{s} in #read_number"
410
414
  end
data/lib/rouge/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Rouge
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
  end
6
6
 
7
7
  # vim: set sw=2 et cc=80:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rouge-lang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: