json_builder 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/json_builder/xchar.rb +1 -15
  2. data/lib/test.rb +1 -0
  3. metadata +2 -2
@@ -8,20 +8,6 @@
8
8
  # If the JsonBuilder::XChar module is not currently defined, fail on any
9
9
  # name clashes in standard library classes.
10
10
 
11
- module JsonBuilder
12
- def self.check_for_name_collision(klass, method_name, defined_constant=nil)
13
- if klass.instance_methods.include?(method_name.to_s)
14
- fail RuntimeError,
15
- "Name Collision: Method '#{method_name}' is already defined in #{klass}"
16
- end
17
- end
18
- end
19
-
20
- if ! defined?(JsonBuilder::XChar)
21
- JsonBuilder.check_for_name_collision(String, "to_xs")
22
- JsonBuilder.check_for_name_collision(Fixnum, "xchr")
23
- end
24
-
25
11
  ######################################################################
26
12
  module JsonBuilder
27
13
 
@@ -87,7 +73,7 @@ end
87
73
  # Enhance the Fixnum class with a XML escaped character conversion.
88
74
  #
89
75
  class Fixnum
90
- XChar = JsonBuilder::XChar if ! defined?(XChar)
76
+ XChar = JsonBuilder::XChar if !defined?(XChar)
91
77
 
92
78
  # XML escaped version of chr. When <tt>escape</tt> is set to false
93
79
  # the CP1252 fix is still applied but utf-8 characters are not
data/lib/test.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'rubygems'
1
2
  require 'json_builder'
2
3
  @json = JsonBuilder::JsonMarkup.new
3
4
  string = @json.user do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 1
9
- version: 1.0.1
8
+ - 2
9
+ version: 1.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Garrett Bjerkhoel