To parse Mac's CR separated CSV, do like this.
CSV.open("mac.csv", "r", ?,,?\r) { |row| p row.to_a }
The 3rd parameter in this example ?, is for column separater and the 4th ?\r
is for row separater. Row separater is nil by default. Nil separater means
"\r\n" or "\n".
* test/csv/test_csv.rb: add tests for above feature.
* test/csv/mac.csv: added. Sample CR separated CSV file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
expressions instead of prototypes. the functions remain yet for
binary compatibility. [ruby-talk:81758]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
libeay32.dll doesn't export functions defined in conf_api.h.
this workaround is to avoid link error.
* ext/openssl/ossl_config.c (ossl_config_initialize): ditto.
* ext/openssl/ossl_config.c (ossl_config_add_value): ditto.
* ext/openssl/ossl_config.c (set_conf_section_i): should check
if the argument is Array.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (localjump_destination): stop at the scope where the current
block was created. [ruby-dev:21353]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
the message.
* lib/webrick/log.rb (BasicLog#log): add "\n" only if needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/openssl/ossl_config.c: refine all with backward compatibility.
* ext/openssl/ossl_config.h: export GetConfigPtr() and DupConfigPtr().
* ext/openssl/ossl_x509.c: added new constants under X509 module.
DEFAULT_CERT_AREA, DEFAULT_CERT_DIR, DEFAULT_CERT_FILE,
DEFAULT_CERT_DIR_ENV, DEFAULT_CERT_FILE_ENV and DEFAULT_PRIVATE_DIR.
* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_free): don't free
the members of the struct. it's left to GC.
* ext/openssl/ossl_x509ext.c (ossl_x509_set_config): add for config=.
* ext/openssl/ossl_x509ext.c (Xossl_x509extfactory_initialize):
add attr readers: issuer_certificate, subject_certificate,
subject_request, crl and config.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/openssl/ossl_config.c: refine all with backward compatibility.
* ext/openssl/ossl_config.h: export GetConfigPtr() and DupConfigPtr().
* ext/openssl/ossl_x509.c: new constants (DEFAULT_CERT_AREA,
DEFAULT_CERT_DIR, DEFAULT_CERT_FILE, DEFAULT_CERT_DIR_ENV,
DEFAULT_CERT_FILE_ENV and DEFAULT_PRIVATE_DIR) in X509 module.
* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_free): don't free
the members of the struct. it's left to GC.
* ext/openssl/ossl_x509ext.c (ossl_x509_set_config): add for config=.
* ext/openssl/ossl_x509ext.c (Xossl_x509extfactory_initialize):
add attr readers: issuer_certificate, subject_certificate,
subject_request, crl and config.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
compatibility stuff. and remove DEFINE_ALLOC_WRAPPER from
all sources.
* ext/openssl/ossl_x509ext.c (X509::Extension.new): new method.
* ext/openssl/ossl_x509ext.c (X509::Extension#oid=): new method.
* ext/openssl/ossl_x509ext.c (X509::Extension#value=): new method.
* ext/openssl/ossl_x509ext.c (X509::Extension#critical=): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (CreateChild): fix condition about whether to call
shell or not.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
array as argument.
* test/ruby/test_*.rb: moved invariants to left side in
assert_equal, and use assert_nil, assert_raises and so on.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
name.
* win32/win32.c (isInternalCmd): distinguish command.com and
cmd.exe.
* win32/win32.c (make_cmdvector): a character just after wildcard
was ignored. [ruby-core:01518]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
system's alloca. [ruby-core:01503]
* io.c (rb_f_gets): should call next_argv() before type check
current_file. [ruby-list:38336]
* eval.c (proc_invoke): should retrieve retval when pcall is true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e