Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ The following bundled gems are promoted from default gems.
* pstore 0.2.0
* benchmark 0.5.0
* logger 1.7.0
* rdoc 6.15.0
* rdoc 6.15.1
* win32ole 1.9.2
* irb 1.15.2
* reline 0.6.2
Expand Down
21 changes: 12 additions & 9 deletions bootstraptest/test_ractor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1187,16 +1187,19 @@ def /(other)
[a.frozen?, a[0].frozen?] == [true, false]
}

# Ractor.make_shareable(a_proc) is not supported now.
assert_equal 'true', %q{
pr = Proc.new{}
# Ractor.make_shareable(a_proc) requires a shareable receiver
assert_equal '[:ok, "Proc\'s self is not shareable:"]', %q{
pr1 = nil.instance_exec { Proc.new{} }
pr2 = Proc.new{}

begin
Ractor.make_shareable(pr)
rescue Ractor::Error
true
else
false
[pr1, pr2].map do |pr|
begin
Ractor.make_shareable(pr)
rescue Ractor::Error => e
e.message[/^.+?:/]
else
:ok
end
end
}

Expand Down
46 changes: 35 additions & 11 deletions defs/gmake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -537,35 +537,59 @@ spec/%/ spec/%_spec.rb: programs exts PHONY

ruby.pc: $(filter-out ruby.pc,$(ruby_pc))

# `make matz`: bump up the MINOR;
# Copying NEWS.md to doc/NEWS/, and empty the details in NEWS.md.
#
# `make matz NEW=x.y`: bump up to x.y.0;
# Just update the version in the title of NEWS.md.

matz: up
$(eval OLD := $(MAJOR).$(MINOR).0)
matz: OLD := $(MAJOR).$(MINOR).0
ifdef NEW
$(eval MAJOR := $(word 1,$(subst ., ,$(NEW))))
$(eval MINOR := $(word 2,$(subst ., ,$(NEW))))
matz: MAJOR := $(word 1,$(subst ., ,$(NEW)))
matz: MINOR := $(word 2,$(subst ., ,$(NEW)))
matz: .WAIT bump_news
else
$(eval MINOR := $(shell expr $(MINOR) + 1))
matz: MINOR := $(shell expr $(MINOR) + 1)
matz: .WAIT reset_news
endif
$(eval override NEW := $(MAJOR).$(MINOR).0)
$(eval message := Development of $(NEW) started.)
$(eval files := include/ruby/version.h include/ruby/internal/abi.h)

matz: .WAIT bump_headers
matz: override NEW := $(MAJOR).$(MINOR).0
matz: files := include/ruby/version.h include/ruby/internal/abi.h
matz: message := Development of $(NEW) started.

flush_news:
$(GIT_IN_SRC) mv -f NEWS.md doc/NEWS/NEWS-$(OLD).md
$(GIT_IN_SRC) commit -m "[DOC] Flush NEWS.md"

.PHONY: flush_news reset_news bump_news bump_headers

bump_headers:
sed -i~ \
-e "s/^\(#define RUBY_API_VERSION_MAJOR\) .*/\1 $(MAJOR)/" \
-e "s/^\(#define RUBY_API_VERSION_MINOR\) .*/\1 $(MINOR)/" \
-e "s/^\(#define RUBY_ABI_VERSION\) .*/\1 0/" \
$(files:%=$(srcdir)/%)
$(GIT_IN_SRC) add $(files)

reset_news: flush_news
$(BASERUBY) -C $(srcdir) -p -00 \
-e 'BEGIN {old, new = ARGV.shift(2); STDOUT.reopen("NEWS.md")}' \
-e 'BEGIN {old, new = ARGV.shift(2); STDOUT.reopen(ARGV.shift)}' \
-e 'case $$.' \
-e 'when 1; $$_.sub!(/Ruby \K[0-9.]+/, new)' \
-e 'when 2; $$_.sub!(/\*\*\K[0-9.]+(?=\*\*)/, old)' \
-e 'end' \
-e 'next if /^[\[ *]/ =~ $$_' \
-e '$$_.sub!(/\n{2,}\z/, "\n\n")' \
$(OLD) $(NEW) doc/NEWS/NEWS-$(OLD).md
$(GIT_IN_SRC) add NEWS.md
$(OLD) $(NEW) NEWS.md doc/NEWS/NEWS-$(OLD).md

bump_news:
$(BASERUBY) -C $(srcdir) -p -i \
-e 'BEGIN {new = ARGV.shift; print gets("").sub(/Ruby \K[0-9.]+/, new)}' \
$(NEW) NEWS.md

matz:
$(GIT_IN_SRC) add NEWS.md $(files)
$(GIT_IN_SRC) commit -m "$(message)"

tags:
Expand Down
Loading