summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2011-11-10 08:44:21 +0100
committerFlorian Frank <flori@ping.de>2011-11-10 08:44:21 +0100
commit70bcd0f0ebef2808aa65d59ac77560a6fff6e5c5 (patch)
treedc294758ebaa97ab387f96ef5faf1c3f514a249d
parent1239442670908599655dda950a959123bce09485 (diff)
downloadjson-70bcd0f0ebef2808aa65d59ac77560a6fff6e5c5.tar.gz
change documentation
-rw-r--r--ext/json/ext/generator/generator.c4
-rw-r--r--lib/json/pure/generator.rb4
2 files changed, 5 insertions, 3 deletions
diff --git a/ext/json/ext/generator/generator.c b/ext/json/ext/generator/generator.c
index d82973e..b878984 100644
--- a/ext/json/ext/generator/generator.c
+++ b/ext/json/ext/generator/generator.c
@@ -1007,6 +1007,8 @@ static VALUE cState_generate(VALUE self, VALUE obj)
* encountered. This options defaults to false.
* * *quirks_mode*: Enables quirks_mode for parser, that is for example
* generating single JSON values instead of documents is possible.
+ * * *buffer_initial_length*: sets the initial length of the generator's
+ * internal buffer.
*/
static VALUE cState_initialize(int argc, VALUE *argv, VALUE self)
{
@@ -1373,7 +1375,7 @@ static VALUE cState_buffer_initial_length(VALUE self)
* call-seq: buffer_initial_length=(length)
*
* This sets the initial length of the buffer to +length+, if +length+ > 0,
- * otherwise it's set to the default value.
+ * otherwise its value isn't changed.
*/
static VALUE cState_buffer_initial_length_set(VALUE self, VALUE buffer_initial_length)
{
diff --git a/lib/json/pure/generator.rb b/lib/json/pure/generator.rb
index 9c776a1..baa94d8 100644
--- a/lib/json/pure/generator.rb
+++ b/lib/json/pure/generator.rb
@@ -173,15 +173,15 @@ module JSON
# it's disabled.
attr_accessor :quirks_mode
- # XXX
+ # :stopdoc:
attr_reader :buffer_initial_length
- # XXX
def buffer_initial_length=(length)
if length > 0
@buffer_initial_length = length
end
end
+ # :startdoc:
# This integer returns the current depth data structure nesting in the
# generated JSON.