summaryrefslogtreecommitdiff
path: root/spec/ruby/core/filetest/identical_spec.rb
blob: b00c5b75e8cb5120c3e4367cc10d6095ef25f7ea (plain)
1
2
3
4
5
6
require_relative '../../spec_helper'
require_relative '../../shared/file/identical'

describe "FileTest.identical?" do
  it_behaves_like :file_identical, :identical?, FileTest
end
actor.new`. I hope this feature can help programmers from thread-safety issues. Notes: Merged: https://github.com/ruby/ruby/pull/3365 2020-05-26Use RUBY_DEBUG instead of NDEBUGKoichi Sasada Assertions in header files slows down an interpreter, so they should be turned off by default (simple `make`). To enable them, define a macro `RUBY_DEBUG=1` (e.g. `make cppflags=-DRUBY_DEBUG` or use `#define` at the very beggining of the file. Note that even if `NDEBUG=1` is defined, `RUBY_DEBUG=1` enables all assertions. [Feature #16837] related: https://github.com/ruby/ruby/pull/3120 `assert()` lines in MRI *.c is not disabled even if `RUBY_DEBUG=0` and it can be disabled with `NDEBUG=1`. So please consider to use `RUBY_ASSERT()` if you want to disable them when `RUBY_DEBUG=0`. Notes: Merged: https://github.com/ruby/ruby/pull/3124 2020-04-13add #include guard hack卜部昌平 According to MSVC manual (*1), cl.exe can skip including a header file when that: - contains #pragma once, or - starts with #ifndef, or - starts with #if ! defined. GCC has a similar trick (*2), but it acts more stricter (e. g. there must be _no tokens_ outside of #ifndef...#endif). Sun C lacked #pragma once for a looong time. Oracle Developer Studio 12.5 finally implemented it, but we cannot assume such recent version. This changeset modifies header files so that each of them include strictly one #ifndef...#endif. I believe this is the most portable way to trigger compiler optimizations. [Bug #16770] *1: https://docs.microsoft.com/en-us/cpp/preprocessor/once *2: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html Notes: Merged: https://github.com/ruby/ruby/pull/3023 2020-04-08Merge pull request #2991 from shyouhei/ruby.h卜部昌平 Split ruby.h Notes: Merged-By: shyouhei <shyouhei@ruby-lang.org>