[#48591] StringValuePtrでnull終止されてない文字列の作り方 — madoka yamamoto <yamamotomadoka@...>
山本ともうします。
5 messages
2014/10/05
[#48598] Re: StringValuePtrでnull終止されてない文字列の作り方
— "NARUSE, Yui" <naruse@...>
2014/10/06
まず、CRubyとしてはStringValuePtrがNUL終端する保証はしていませんから、仮にnull-terminateしてないことにより問題が起きるならば、
[#48666] Re: [ruby-cvs:55171] duerst:r48021 (trunk): common.mk: Added a rule to generate lib/unicode_normalize/tables.rb. — "Martin J. Dürst" <duerst@...>
中田さん、こんにちは。
3 messages
2014/10/19
[ruby-dev:48632] [ruby-trunk - Feature #10381] Pathname#mkdir_p, Pathname#makedirs が欲しい
From:
takkanm@...
Date:
2014-10-15 04:27:53 UTC
List:
ruby-dev #48632
Issue #10381 has been updated by 三村 益隆.
> mkdir_p はコマンド名っぽくておすすめしたくないな、と思っています。
FIleUtils では mkdir_p のほうがコマンドの挙動がすぐ連想できるの使っています。
FileUtils からの連想で Pathname に無いというのを気づいたため、Pathname#mkdir_p があると嬉しいと感じています。
FileUtils#mkpath と FileUtils#mkdir_p どちらがよく使われているか気になって、GitHub でコードの検索をしたところ FileUtils#mkdir_p のほうがよく使われているようです。
FileUtils#mkdir_p 369,095 https://github.com/search?l=ruby&q=FileUtils.mkdir_p&ref=searchresults&type=Code&utf8=%E2%9C%93
FileUtils#mkpath 17,014 https://github.com/search?utf8=%E2%9C%93&q=FileUtils.mkpath&type=Code&ref=searchresults
----------------------------------------
Feature #10381: Pathname#mkdir_p, Pathname#makedirs が欲しい
https://bugs.ruby-lang.org/issues/10381#change-49443
* Author: 三村 益隆
* Status: Feedback
* Priority: Normal
* Assignee: Akira Tanaka
* Category:
* Target version:
----------------------------------------
Pathname#mkpath にも FileUtils#mkpath と他の同じ挙動をするメソッド名が欲しいです。
~~~
diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb
index 82541e9..40c3ae1 100644
--- a/ext/pathname/lib/pathname.rb
+++ b/ext/pathname/lib/pathname.rb
@@ -564,6 +564,8 @@ class Pathname # * FileUtils *
FileUtils.mkpath(@path)
nil
end
+ alias :mkdir_p :mkpath
+ alias :makedirs :mkpath
# Recursively deletes a directory, including all directories beneath it.
#
~~~
--
https://bugs.ruby-lang.org/