relisp 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ == 1.1.1 / 2011-01-10
2
+
3
+ * 1 minor enhancement
4
+ * Ruby unicode escape sequences fixed to work with emacs.
5
+
1
6
  == 1.1.0 / 2011-01-05
2
7
 
3
8
  * 2 major enhancements
@@ -270,7 +270,8 @@ module Relisp
270
270
  end
271
271
 
272
272
  def to_elisp
273
- self.dump
273
+ # convert "\u{0000}" to "\u0000"
274
+ self.dump.gsub(/\\u\{([0-9a-e]+)\}/) { |m| sprintf("\\u%04x", $1.to_i(16)) }
274
275
  end
275
276
  end
276
277
 
data/lib/relisp.rb CHANGED
@@ -19,7 +19,7 @@
19
19
  #++
20
20
 
21
21
  module Relisp
22
- VERSION = '1.1.0'
22
+ VERSION = '1.1.1'
23
23
 
24
24
  class ElispError < RuntimeError; end
25
25
  end
@@ -271,10 +271,11 @@ module TestRelisp
271
271
  end
272
272
 
273
273
  def test_to_elisp
274
- str = "a string\nwith two lines"
275
- assert @emacs.elisp_eval( "(equal \"a string\\nwith two lines\" #{str.to_elisp} )" )
274
+ str = "a string\nwith unicode: \u{20b6}"
275
+ assert @emacs.elisp_eval( "(equal \"a string\\nwith unicode: \\u20b6\" #{str.to_elisp} )" ), "This test will fail in ruby 1.8, but that's okay"
276
276
  @emacs.provide(:str, binding)
277
- assert @emacs.elisp_eval( "(equal \"a string\\nwith two lines\" (ruby-eval \"str\") )" )
277
+ assert @emacs.elisp_eval( "(equal \"a string\\nwith unicode: \\u20b6\" (ruby-eval \"str\") )" )
278
+ assert_equal str, @emacs.elisp_eval( "(ruby-eval \"str\")" )
278
279
  end
279
280
  end
280
281
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relisp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 0
10
- version: 1.1.0
9
+ - 1
10
+ version: 1.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Don
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-05 00:00:00 -05:00
18
+ date: 2011-01-10 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency